# COMPOUND INTEREST # Frans Coenen # University of Liverpool # 8 June 2013 # Input amount = int(input("Enter initial (base) amount you wish to deposit: ")) rate = float(input("Enter annual interest rate (as a percentage): ")) numYears = int(input("Enter number of years the amount is to be deposited for: ")) payments = int(input("Enter number of times the interest is compounded per year: ")) # Calculation rate = rate/100 endSum = amount*(1+(rate/payments))**(payments*numYears) # Output print('End sum = {0:.3f}'.format(endSum))