Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Join our Q&A platform and get accurate answers to all your questions from professionals across multiple disciplines. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

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.


Sagot :

Answer:

In Python

current = int(input("Current Price: "))

lmonth = int(input("Last Month Price: "))

mortgage = current * 0.051 / 12

print('The house is ${:.2f}'.format(current))

print('The change is ${:.2f}'.format(current-lmonth)+" since last month")

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

Explanation:

This gets the current price

current = int(input("Current Price: "))

This gets the last month's price

lmonth = int(input("Last Month Price: "))

This calculates the mortgage

mortgage = current * 0.051 / 12

This prints the house current price

print('The house is ${:.2f}'.format(current))

This prints the change

print('The change is ${:.2f}'.format(current-lmonth)+" since last month")

This prints the estimated mortgage

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

Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Find reliable answers at Westonci.ca. Visit us again for the latest updates and expert advice.