Sera H.

asked • 03/08/21

python weather question

Write a program that will ask the user if they want to enter Fahrenheit (or f or F) or Celsius (or c or C) - you must allow all variations shown here for this input. Then it will ask the user to enter the temperature (any number value, for this program you can assume the user follows directions and you do not need to verify it is a number). Based on the choice of Fahrenheit or celsius, the program will convert the temperature to the other unit of measurement rounded to 2 decimal places.


You will then print a different message based on the current Celsius temperature:

  1. -40 or below degrees Celsius: "Get inside and warm up! You will get hypothermia!"
  2. above -40 to 10 degrees celsius: "It is cold, wears a warm jacket."
  3. above 10 to 17 degrees celsius: "It is mild out, wear a light jacket."
  4. above 17 to 29 degrees celsius: "It is warm outside."
  5. above 29 to 40 degrees celsius: "It is very hot! Drink some water and find some shade!"

Over 40 degrees celsius: "We’re melting!!!"

1 Expert Answer

By:

Patrick B. answered • 03/08/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.