Question: Write a program that asks the user for current outside temperature, and prints a report. Specifically, 1. It asks the user to enter temperature units,

Write a program that asks the user for current outside temperature, and prints a report. Specifically, 1. It asks the user to enter temperature units, either Fahrenheit or Celsius. Valid inputs: F/f/C/c. 2. If user enters an invalid input o Prints that input was invalid 3. Else o It asks the user to enter the temperature. o Based on the units entered at step 1, if needed, converts the temperature to Fahrenheit using following formula: Fahrenheit = Celsius*9/5 + 32 o Prints the temperature in Fahrenheit. o Prints the weather analysis using following policy: 1. If temperature in Fahrenheit is higher than 80 F, prints It is too hot outside. 2. Else if it is lower than 60F, prints It is chilly outside. 3. Otherwise, prints It is very pleasant outside. Notes:

Assume that user enters integer values for the temperature.

Remember to use for string literals.

You should use the Logical operators (and / or / not) to combine multiple comparisons.

Choose the if-statement structure carefully.

You can use lower() and upper() functions defined for strings to help with input validation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!