Question: Here's one python question. Please show your works by coding in your python program? I'm not sure with my equation for FV. Here's my code:

 Here's one python question. Please show your works by coding inHere's one python question. Please show your works by coding in your python program? I'm not sure with my equation for FV.

Here's my code:

r=eval(input("Enter a target MONTHLY rate of return (without the % sign):")) n=eval(input("Enter the number of months:")) PV=round(1000*(1-(1+r)**-n)/r) FV=round(1000*n) print("The total MPF of $"+str(FV), "in", n, "months is worth $"+str(PV),"today.")

Assume you and your employer each contribute HKD 500 to your Mandatory Provident Fund (MPF) at the end of every month (HKD 1,000 in total). Suppose the beginning account balance is zero, and the return is compounded monthly. Write a Python program to calculate the present value of the MPF. 1) Let the user set a target monthly rate of return and the number of months. 2) Round the answer to the nearest dollar. The output should resemble the following. Enter a target MONTHLY rate of return (without the \% sign): 0.05 Enter the number of months: 5 The total MPF of $5000 in 5 months is worth $4329 today

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!