Here is a program that calculates the final value of a 10 year fixed term investment, given the initial investment amount and the interest rate.

'''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()

Modify the function so that the user can specify the period of the investment. Further modify the function so that the user can make additional fixed yearly investments.

Specify 5 sets of test data you can use to test the program and the expected results for that test data. Provide test listings to verify your predictions.

'''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()

Modify the function so that the user can specify the period of the investment. Further modify the function so that the user can make additional fixed yearly investments.

Specify 5 sets of test data you can use to test the program and the expected results for that test data. Provide test listings to verify your predictions.

### Recently Asked Questions

- I need help finding the estimated variance-covariance matrix, s 2 (b), associated with the model I developed in part(a). Please explain how I would go about

- Explain how historical thought and tradition affect civil liberties and rights as they pertain to the issue you chose. What consequences do you support for

- Please refer to the attachment to answer this question. This question was created from cuaderno03_20150217.