151k views
0 votes
Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (current_price * 0.051)

1 Answer

5 votes

Answer:

current_price = int(input("Enter the current price: "))

last_months_price = int(input("Enter the last month's price: "))

print("Current price is: " + str(current_price) + ", Last month's price was: " + str(last_months_price))

print("The change since last month is: " + str(current_price - last_months_price))

print("The estimated monthly mortgage is: " + str(current_price * 0.051))

Step-by-step explanation:

Get the inputs for the current price and last month's price

Print the prices

Calculate and print the change, current_price - last_months_price, since last month

Calculate, using given formula, and print the estimated monthly mortgage

User Rredondo
by
6.0k points