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

A student finds a container of gases in the laboratory classroom with a total pressure reading of 655 mmHg. The label on the container describes the contents as
Shoshanna is hyperactive at school, often having trouble with instructions, sitting still in her seat, and focusing on her schoolwork. Shoshanna is most likely
Shelton Co. purchased a parcel of land six years ago for $877,500. At that time, the firm invested $149,000 in grading the site so that it would be usable. Sinc
Solving Unit Rate Problems 1. If a 20-ounce Dr. Pepper costs $1.20 and a 12-ounce Dr. Peppers costs $0.60, which has a better price per ounce and by how much?
Problem 2 Write a method that (a) returns an int[] , (b) takes in two sorted arrays (in descending order) and (c) returns an int [] with sorted values (in des
Maria wants to determine which type of disinfectant kills the most bacteria. Which of the following is the best way for Maria to determine this
Blossom Company purchased a machine with a list price of $168000. They were given a 10% discount by the manufacturer. They paid $1000 for shipping and sales tax
Larkin Company accumulated the following standard cost data concerning product I-Tal. Direct materials per unit: 2.10 pounds at $6.36 per pound Direct labor per
Ashley went shopping at the mall she spent 2/5 of her money on new shoes and 1/6 of her money on new jeans. What fraction part of her money remain?​
Caleb paid $26.70, including a 7% sales tax, for a security wallet. How much did the wallet itself cost?