Write a program in Python that computes the interest accrued on
- You can modify the “futval.py”
program given in Chapter 2 to accomplish it. Your program should
use a counted loop rather than a formula.
- It should prompt the user to enter the principal amount, the
yearly interest rate as a decimal number, the number of compounding
periods in a year, and the duration.
- It should display the principal value at the end of the
- To compute the value in 10 years for example, the program
should loop 10 * periods times and accrue rate /period interest on
- If the principal is $1,000.00, yearly interest rate is 0.04
(4%), compounding periods in a year are 4, and the duration is 10
years, then the program should display $1488.86.
print(" This Program calculates the future
print(" of a 10-year investment. ")
principal = eval(input("Enter the initial principal:
apr = eval(input("Enter the initial principal:
for i in range(10):
principal = principal *(1
print("The value in 10 years