1.Complete Steps 1-7 in the comments below. The remaining comments explain the logic.  Customers can check a variety of loans and interest rates. When finished, type quit # Step 1: add an input statement to enter name or type quit to exit     # Step 2: add a while loop to keep asking for a name until the user types quit       # Step 3: declare two variables for loan and interest, like months below,      # convert them to float, and ask the user to input their values to the screen.          months = float(input("How many months will it take to repay your loan? "))     print("***************************************************************")     print (name, "you requested an estimate on a loan for {0:.2f}" .format(loan))     # Step 4: add a print statement to display the interest and # of months          print("*******************************************************************************")     print("Here are the rates for simple interest, compound interest, and monthly interest", "\n")      # calculate the rate for one month's interest + payment by adding 1 to a month's interest     interest_rate = float((interest/12)+1)     # calculate the compound interest per payment period by raising the       # monthly payment to the negative power of total months     compound_interest = float(1-((interest/12)+1) ** -months)     # Step 5: print the interest_rate and compound_interest to the display screen       # calculate the monthly interest based on the compound interest     monthly_interest = float((interest/12)/ compound_interest)     print(monthly_interest, "\n")     # calculate the monthly loan payment with monthly compound interest     payments = float(loan * monthly_interest)     # Step 6: write a print statement that displays the monthly payments to two decimal points     # Tip: use the 0:.2f format from an earlier example, only for the payments          print("*******************************************")     # Step 7: add an input statement to enter name or type quit to exit print() print("Thank you for using the Mortgage Loan Calculator")

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 28PE
icon
Related questions
Question


1.Complete Steps 1-7 in the comments below. The remaining comments explain the logic.
 Customers can check a variety of loans and interest rates. When finished, type quit

# Step 1: add an input statement to enter name or type quit to exit

 

 

# Step 2: add a while loop to keep asking for a name until the user types quit

 

    # Step 3: declare two variables for loan and interest, like months below, 
    # convert them to float, and ask the user to input their values to the screen. 

 

 

    months = float(input("How many months will it take to repay your loan? "))

    print("***************************************************************")
    print (name, "you requested an estimate on a loan for {0:.2f}" .format(loan))

    # Step 4: add a print statement to display the interest and # of months

    
    print("*******************************************************************************")
    print("Here are the rates for simple interest, compound interest, and monthly interest", "\n") 

    # calculate the rate for one month's interest + payment by adding 1 to a month's interest
    interest_rate = float((interest/12)+1)

    # calculate the compound interest per payment period by raising the  
    # monthly payment to the negative power of total months
    compound_interest = float(1-((interest/12)+1) ** -months)


    # Step 5: print the interest_rate and compound_interest to the display screen

 

    # calculate the monthly interest based on the compound interest
    monthly_interest = float((interest/12)/ compound_interest)
    print(monthly_interest, "\n")

    # calculate the monthly loan payment with monthly compound interest
    payments = float(loan * monthly_interest)


    # Step 6: write a print statement that displays the monthly payments to two decimal points
    # Tip: use the 0:.2f format from an earlier example, only for the payments

    

    print("*******************************************")
    # Step 7: add an input statement to enter name or type quit to exit


print()
print("Thank you for using the Mortgage Loan Calculator")

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning