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 as follows:

f = p * (1 + i)^t

• f is the future value of the account after the specified time period.
• p is the present value of the account.
• i is the monthly interest rate.
• t is the number of months.

Write a program that takes the account's present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user. The program should pass these values to a function thatreturns the future value of the account, after the specified number of months. The program should print the account's future value.

Sample Run

Enter current bank balance:35.7↵
Enter interest rate:0↵
Enter the amount of time that passes:100↵ 35.7

Respuesta :

Answer:

See code below and explanation.

Explanation:

We can use Python for this wih the program Spyder to create the following code:

# INPUTS

p = float(input("Enter current bank balance: "))

i = float(input("Enter interest rate in %: "))

t = int(input("Enter the amount of time that passes: "))

# OUTPUTS

f=p*(1+ (i/100))**t

print("The future values is:", f)

We assume that the interest rate given is in % and we divide by 100 in order to convert to fraction.

And the example result obtained is given below:

Enter current bank balance: 35.7

Enter interest rate in %: 0

Enter the amount of time that passes: 100

The future values is: 35.7

According to Python, we are using a formula for this with the program Spyder to create the following code:

Python

First we put # INPUTS Also, p = float(input("Enter current bank balance: ")) Then i = float(input("Enter interest rate in %: ")) Now, t = int(input("Enter the amount of time that passes: ")) Secondly, we put # OUTPUTS After that f=p*[tex](1+ (i/100))**t[/tex] Then print("The future values are:", f) Now We are assumed that the interest rate given is in % and also we divide by 100 to convert to a fraction. Example: Then the Enter current bank balance: 35.7 After that Enter interest rate in %: 0 Then Enter the amount of time that passes: 100 Thus, The future value is: [tex]35.7[/tex]

Find out more information about Python here:

https://brainly.com/question/14492046