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↵

Btw, this does not work, but is presumably close to the answer.
p=float(input("Enter current bank balance:"))
i=float(input("Enter interest rate:"))
t=float(input("Enter the amount of time that passes:"))

print(p *(1+i)^t)

Answers

Answer 1

Answer:

The update code is:

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

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

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

print(p*(1+i)**t)

Explanation:

Required

Program to compute future value

Up to the third line, your program is correct.

The only correction that needs to be made is as follows:

On the fourth line, change p*(1+i)^t to p*(1+i)**t because Python use ** as raise to power and not ^


Related Questions

Type the correct answer in the box. Spell all words correctly.
Derek wants to share his digital portfolio with a wider audience. How can he do so?
Derek should publish his digital portfolio on the
, to show it to a wider audience.

Answers

Answer:

internet

Explanation:

Derek wants to share his digital portfolio with a wider audience. Then this can be done by the internet.

What is the internet?

An international network is a collection made up of linked networks that use standardized data exchange to provide a range of digital services.

Derek wants to share his digital portfolio with a wider audience. Then this can be done by the internet.

More about the internet link is given below.

https://brainly.com/question/13308791

#SPJ2

Other Questions
The substance ammonia has the following properties: normal melting point: 195.4 K normal boiling point: 239.8 K triple point: 5.910-2 atm, 195.3 K critical point: 111.5 atm, 405.5 K At temperatures above 405.5 K and pressures above 111.5 atm, NH3 is a _________ . NH3 does not exist as a liquid at pressures below atm. NH3 is a _________ at 5.9010-2 atm and 249.5 K. NH3 is a _________ at 1.00 atm and 236.0 K. NH3 is a _________ at 24.6 atm and 185.6 K. Which religious groups bordered the French territory in the Americas?A.only British ProtestantsB.only Portuguese CatholicsC.Spanish Catholics and Dutch ProtestantsD.British Protestants and Spanish Catholicswhich one? Which political party took up some of the Populist Partys issues after its collapse? Nutrients are molecules that can be found in______ What happens at locations where magma convection currents flow away from one another?A. Overlying, adjacent plates collide violently. B.groundwater rises to the surface.C.new crust is formed along the boundary.D.oceanic plates slide beneath continental plates.E.overlying, adjacent plates are pulled apart. if a=1 and b=2 what is the value of a+b? In how many differentways can 5 bicycles beparked if there are 7available parkingspaces? pls pasagot To solve this system of equations by elimination you should begin by... x+y=10 2x-3y=6 A) adding the two equations together. B) multiplying the first equation by 2, then add them together. C)multiplying the first equation by 3, then add them together. D) subtracting the first equation from the second equation Help!! Thank you so much Identify the missing measures Plz help me well mark brainliest if correct!!..... victimisation refers to a person's violation of a human rights as well as a disturbance of their what A certain object is subject to two forces: a 10-N force straight up and a 10-N force straight down. A student states that since both forces are in the vertical direction, the object cannot be moving horizontally. Why is this an incorrect conclusion?A.The vertical forces are balanced.B.Vertical net forces can cause horizontal motion.C.A horizontal force is not required for horizontal movement.D.Two vertical forces can combine to form a horizontal resultant force. gave young african american activists a voice in the civil rights movement lf 9/28 of the students at Williards High school participate in after school sports activities, what fraction of the students do not participate in after school activities Which is stressed most in advertisement The part of a text where the action starts to decline is fuluwa fishing in the den ( into negative ) 2. Which equation describes a line that hasa slope of and a y-intercept of ?A) 5y + 4x = 2C) Sy - 4x = 2B) 4x5y = 2D) -5y - 4x = 2 How much 0.05 M HCl solution can be made by diluting 2L of 10 M HCl?