Question: # futval.py #A program to compute the value of an investment throughout the inputed future years, rounded to 2 decimal places #by Mar a Caminero

# futval.py
#A program to compute the value of an investment throughout the inputed future years, rounded to 2 decimal places
#by Mara Caminero
def main ():
print("This program calculates the future value of a yearly investment")
principal = eval(input("Enter the initial principal: "))
apr = eval(input("Enter the annual interest rate: "))
years = eval(input("Enter the number of years for the investment: "))
for i in range(10):
principal = principal *(1+ apr)
print("The value in", years, "years is:", round(principal,2)) por que me da error?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!