#fv_annuity.py #Future value (FV) of an ordinary annuity p = eval(input("Enter the periodic payment P: $")) n = eval(input("Enter the number of payments per year n: ")) r = eval(input("Enter the interest rate r: %")) r = r / 100 #convert to decimal equivalent t = eval(input("Enter the time in years t: ")) fv = p*((1+r/n)**(n*t) - 1) / (r/n) print("The future value of the annuity will be: $", round(fv,2)) #Tests: # P=100 n=10 r=10 t=10 fv=17048.14 # p=100 n=1 r=5 t=6 fv=680.19 # p=100 n=12 r=5 t=20 fv=41103.36