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))

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

* I  should use format in my code. 
* I should enter my inputs in the box in the 2nd pic! 

### Understanding House Price Summary Outputs

Websites like Zillow utilize data about house prices to create summaries for users. Here’s a simple program designed to input two integers: the current house price and the last month's house price. The program then outputs a summary, including:

- **The current price**
- **The change in price since last month**
- **The estimated monthly mortgage**

#### Mortgage Calculation
The estimated monthly mortgage is calculated using the formula:
\[ \text{Estimated Mortgage} = \left(\text{current\_price} \times 0.051\right) / 12 \]

#### Formatting Output
To ensure numerical outputs have two decimal points, use the formatting syntax:
```python
print('{:.2f}'.format(your_value))
```

#### Example
**Input:**

```
200000
210000
```

**Output:**

```
This house is $200000. The change is $-10000 since last month.
The estimated monthly mortgage is $850.00.
```

#### Key Notes
Maintaining precise spacing, punctuation, and line breaks is crucial for accurate programming outputs. Paying attention to formatting details is a vital programming skill.
Transcribed Image Text:### Understanding House Price Summary Outputs Websites like Zillow utilize data about house prices to create summaries for users. Here’s a simple program designed to input two integers: the current house price and the last month's house price. The program then outputs a summary, including: - **The current price** - **The change in price since last month** - **The estimated monthly mortgage** #### Mortgage Calculation The estimated monthly mortgage is calculated using the formula: \[ \text{Estimated Mortgage} = \left(\text{current\_price} \times 0.051\right) / 12 \] #### Formatting Output To ensure numerical outputs have two decimal points, use the formatting syntax: ```python print('{:.2f}'.format(your_value)) ``` #### Example **Input:** ``` 200000 210000 ``` **Output:** ``` This house is $200000. The change is $-10000 since last month. The estimated monthly mortgage is $850.00. ``` #### Key Notes Maintaining precise spacing, punctuation, and line breaks is crucial for accurate programming outputs. Paying attention to formatting details is a vital programming skill.
**Interactive Program Execution Interface**

This interface provides modes for running your program:

1. **Develop Mode / Submit Mode**: Two options are available at the top for managing your program execution. Choose "Develop mode" for testing and debugging or "Submit mode" for final submission.

2. **Input Section**:
   - **Enter Program Input (Optional)**: An input box is provided where users can enter their specific data or parameters for the program. In this example, values entered are:
     - `200000`
     - `210000`

3. **Run Program Button**:
   - A button labeled "Run program" is included to execute the program with the inputs provided.

4. **Program Output**:
   - Below the button, there is a display area where the program's output will be shown after execution. Currently, this area is empty, indicating no program has been run yet or the output is pending.

This interface is designed to facilitate user interaction with their program through a straightforward input and execution system.
Transcribed Image Text:**Interactive Program Execution Interface** This interface provides modes for running your program: 1. **Develop Mode / Submit Mode**: Two options are available at the top for managing your program execution. Choose "Develop mode" for testing and debugging or "Submit mode" for final submission. 2. **Input Section**: - **Enter Program Input (Optional)**: An input box is provided where users can enter their specific data or parameters for the program. In this example, values entered are: - `200000` - `210000` 3. **Run Program Button**: - A button labeled "Run program" is included to execute the program with the inputs provided. 4. **Program Output**: - Below the button, there is a display area where the program's output will be shown after execution. Currently, this area is empty, indicating no program has been run yet or the output is pending. This interface is designed to facilitate user interaction with their program through a straightforward input and execution system.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education