Question: Create a python program that does the following: Ask users to enter an estimated dollar amount for monthly restaurant bill. Decide the tip amount: Suppose
Create a python program that does the following:
Ask users to enter an estimated dollar amount for monthly restaurant bill.
Decide the tip amount: Suppose that users usually give 18% tips, calculate the corresponding tips for the estimated monthly restaurant bill.
Decide the monthly IRA investment: Add the tips to the monthly restaurant bill and the total will be the monthly IRA investment.
Ask users to enter the number of years that they plan to save (invest) in this way.
Suppose that you use 5% as the annual interest rate. Calculate the future value of this investment (of savings from restaurant bill) using this formula:
futureValue = monthlyInvestment *[(1+r)N-1]/r,
whereN= number of investment periods, andr= interest rate per period. Since users invest monthly, hereN= number of years *12andr= annual interest rate/12. Feel free to define variables to represent N and r to simplify the formula entry.Please follow the name convention and python rules to properly name the variables, i.e., do not copy the names literately from the formula.
Display a message specifying the monthly restaurant bill, tip, and total saving per month and informing users of the future value of their investment. You should write the output message using variables and customized Strings.
Fix any syntax errors and test your code if you can. For a $100 monthly restaurant bill, 18% tip rate, 1-year IRA saving at 5% annual rate, the future value will be 1448.9.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
