Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose you have a certain amount of money in a savings account that earns compo

ID: 3552175 • Letter: S

Question

Suppose you have a certain amount of money in a savings account that earns compound monthly interest and you want to calculate the amount that you will have after a specific number of months. the formula is F = P X ( 1 + i ) ** t F = future value of the account P = present value of the account i = monthly interest rate t = the number of months. Write a program that prompts the user to enter the accounts present value, monthly interest rate, and number of months that the money will be left in the account. The program should pass these values to a function that returns the future value of the account after the specified number of months. The program should display the accounts future value.

Explanation / Answer

Dear,

Define main() function.

#The main function
def main():

# get desired present value
PresentValue = float(input
                      ('Enter account present value: '))
#get annual interest rate
   rate = float(input('Enter annual interest rate: '))

#get months
months =   int(input('Enter number of months: '))

futureValue = PresentValue *(1+rate)**months

print('Your future value: ',futureValue )


#Call the main function
At last call main() function.
main()

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote