below is my program. what i would like to do is to get the last line to
print the number of years that the user enters and also the principal




# A program to compute the value of an investment
# years into the future

def main():
    print "This program calculates the future value of an investment over
years"

    principal = input("Enter the initial principal: ")
    apr = input("Enter the annual interest rate: ")
    years = input("Enter the number of years: ")

    for i in range(10):
        principal = principal * (1 + apr)

    print "The value in years is", principal

main()


_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to