Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

A.

Create a simple Python HVAC (Heating, Ventilation, and Air Conditioning) system's operation based on the
outdoor temperature.

1. Prompt the user to input the outdoor temperature in Fahrenheit.


2. Check Temperature Range:
 If the outdoor temperature is less than 32°F:
 Activate heating systems.
 Ensure all heating units are operational.
 Else, if the outdoor temperature is between 32°F and 50°F:
 Increase heating output to maintain indoor comfort levels.
 Else, if the outdoor temperature is between 50°F and 65°F:
 Reduce heating output.
 Consider natural ventilation to maintain comfort.
 Else, if the outdoor temperature is between 65°F and 80°F:
 Begin cooling operations.
 Ensure all cooling units are operational.
 Else, if the outdoor temperature is 80°F or higher:
 Activate cooling systems.
 Optimize airflow to maintain a comfortable indoor temperature.
3. Display the appropriate message based on the outdoor temperature range and HVAC system adjustments.

B. Create a program that calculates airspeed based on altitude and temperature


1. Take input for altitude (in feet) and temperature (in Fahrenheit) from the user.
2. Check for error conditions:
 If altitude is negative, print an error message.
 If altitude exceeds 36,000 feet, print an error message.
 If temperature is below absolute zero, print an error message.
3. If no errors are found, calculate airspeed using the provided formula:

1. Print the calculated airspeed in two decimal point format.


Paste your code here use comments to properly document your program.

You might also like