3.15 Lab: Input And Formatted Output: House Real Estate Summary
Introduction
The 3.15 Lab is a programming exercise that focuses on input and formatted output in Python. In this lab, students are required to write a program that generates a summary of a house real estate listing. The program should prompt the user for various inputs such as the address, the asking price, the number of bedrooms and bathrooms, and other relevant details. Once the inputs are provided, the program should generate a formatted output that summarizes the key features of the house.
Input
The input stage of the program involves prompting the user for various details about the house. These details include the address, the asking price, the number of bedrooms and bathrooms, the square footage, and other relevant details. The program should ensure that the inputs are valid and within reasonable ranges. For example, the asking price should be a positive integer, and the number of bedrooms and bathrooms should be between 1 and 10.
Output
The output stage of the program involves generating a summary of the house listing based on the inputs provided by the user. The summary should include the address, the asking price, the number of bedrooms and bathrooms, the square footage, and other relevant details. The output should be formatted in a clear and concise manner, with each detail presented in a separate line.
Sample Output
Here is a sample output of the program:
123 Main Street
Asking Price: $500,000
Bedrooms: 3
Bathrooms: 2
Square Footage: 2,000 sq.ft.
Garage: Attached 2-car garage
Pool: No
Conclusion
The 3.15 Lab is a useful exercise that helps students learn how to work with input and formatted output in Python. By creating a program that generates a summary of a house real estate listing, students can improve their skills in programming, logic, and problem-solving. The lab also provides an opportunity for students to practice their communication skills by presenting information in a clear and concise manner.