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 (current_price * 0.051) / 12.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('{:.2f}'.format(your_value))
Ex: If the input is:
200000
210000
the output is:
This house is $200000. The change is $-10000 since last month.
The estimated monthly mortgage is $850.00.
Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.
main.py
current_price = int(input())
last_months_price = int(input())
''' Type your code here. '''

Respuesta :

Answer:

current_price = int(input())

last_months_price = int(input())

change = current_price - last_months_price

mortgage = (current_price * 0.051) / 12

print('This house is

Otras preguntas

+ str(current_price) + '. The change is

Otras preguntas

+ str(change) + ' since last month.')

print('The estimated monthly mortgage is ${:.2f}.'.format(mortgage))

Explanation:

Ask the user to enter the current price and last month's price

Calculate the change, subtract last month's price from the current price

Calculate the mortgage using the given formula

Print the results in required format

Otras preguntas

In triangle OPQ, the measure of angle Q=90°, OQ=33, PO= 65, and QP= 56. What ratio represents the tangent of angle P?
100 points!!!!!!!!!!!!!!!!!!! The box plot shows the number of jumping jacks completed in a workout class by the class members. A box plot uses a number line fr
In a shop the total cost of two shirts and a trouser is Rs 3491.96 if the cost of a shirt is Rs 2006.99 less than the cost of trouser then what is the cost of a
A survey collected data from a random sample of 121 people living in Jade oty. The sample average of the distance people travel to reach their workplaces (Y) is
You buy hats for $20, and sell them for $5 each. What does the graph of the profits look like? A: A curve that goes up B: A line that goes down C: A curve that
The Ferris Wheel ride at a carnival sits 3 meters above the ground and sends riders to a maximum height of 33 meters in the air. The equation y = 15sin(x) + 18
the graph of f(x)=|x-h|+k contains the points (-6,-2) and (0,-2). the graph has a vertex at (h,-5). descrie how to find the value of h. then, explain how this v
Which of the following sets of numbers could repersent the three sides of a triangle? a: 15,27,42 b:15,18,33 c:8,20,25 d:12,23,35
The Ferris Wheel ride at a carnival sits 3 meters above the ground and sends riders to a maximum height of 33 meters in the air. The equation y = 15sin(x) + 18
21 shirts = $147 and 22 shirts =$154 and 23 shirts = $161 then how much does 30 shirts cost and how much does 9 shirts cost to