1.12 LAB: Input and formatted output: House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers. 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 (currentPrice * 0.045) / 12 (Note: Output directly. Do not store in a variable.).

Respuesta :

Explanation:

User is asked to input two parameter current price of the house and last month price of the house (type int is set as instructed in the question)

Change in price is calculated using current price - last month price and mortgage is calculated using the equation provided in the question.

All the calculations are done in the print function rather than storing them in separate variables as instructed in the question.  

Python Code:

current_price=int(input("Please enter the current price of the house: "))

last_price=int(input("Please enter the last month price of the house "))

print("\n------REAL STATE HOUSE SUMMARY------\n ")

print("Current Price of the House: ", current_price)

print("Last Month's Price of the House: ", last_price)

print("Change in Price of the House: ", current_price - last_price)

print("The Estimated Mortgage of the House: ", (current_price*0.045)/12)

print("\n----------------END----------------")

Output:

Please enter the current price of the house: 50000

Please enter the last month price of the house: 40000

------REAL STATE HOUSE SUMMARY------

Current Price of the House: 50000

Last Month's Price of the House: 40000

Change in Price of the House: 10000

The Estimated Mortgage of the House: 187.5

----------------END----------------

Ver imagen nafeesahmed

The program is meant to be written in Python. The program in Python where comments are used to explain each line is as follows:

#This prints the heading

print("\t\t\t ZILLOW REAL ESTATE")

#This gets input for the current price of the house

currentPrice = int(input("Current Price of the House: "))

#This gets input for the last month price of the house

lastMonth = int(input("Last Month Price of the House: "))

#This calculates and prints the change in the price of the house since last month

print("Change in Price since Last Month:",(currentPrice - lastMonth))

#This calculates and prints the estimated mortgage of the house

print("Estimated Mortgage:",((currentPrice * 0.045) / 12))

Read more about python programs at:

https://brainly.com/question/22841107