def calculate_compound_interest(principal, rate, time):
    amount = principal * (pow((1 + rate / 100), time))
    compound_interest = amount - principal
    print(f"The Compound Interest is: {compound_interest}")

# Example usage:
principal_amount = float(input("Enter the principal amount: "))
rate_of_interest = float(input("Enter the rate of interest: "))
time_period = float(input("Enter the time period (in years): "))
calculate_compound_interest(principal_amount, rate_of_interest, time_period)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: