1P = int(input("Enter starting principle please. "))
2n = int(input("Enter number of compounding periods per year. "))
3r = float(input("Enter annual interest rate. e.g. 15 for 15% "))
4y = int(input("Enter the amount of years. "))
5
6FV = P * (((1 + ((r/100.0)/n)) ** (n*y)))
7
8print ("The final amount after", y, "years is", FV)
9