'''calculate the future value of an investment after 10 years'''
def calcValue( initialValue, interestRate ):
period = 10
investmentValue = initialValue
for i in range(period):
investmentValue = investmentValue * ( 1 + interestRate )
return investmentValue
def main():
principal = int(raw_input("Enter initial investment amount: "))
interest = float(raw_input("Enter interest rate as a percentage: ")) / 100
finalValue = calcValue( principal, interest )
print "Final value of the investment is $%0.2f" % finalValue
main()
i need to modify this program so that a user can specify the period of invest and so the user can make additional yearly investments.
i'm just unsure how to approach the question
Any sugesstions?