Temperature Warnings

In [2]:
def temp_convert():
    celsius = float(input("What is the Celsius temperature? "))
    fahrenheit = 9/5 * celsius + 32
    print("The temperature is", fahrenheit, "degress Fahrenheit.")
In [4]:
temp_convert()
What is the Celsius temperature? 0
The temperaturn is 32.0 degress Fahrenheit.
In [9]:
def temp_convert2():
    celsius = float(input("What is the Celsius temperature? "))
    fahrenheit = 9/5 * celsius + 32
    print("The temperature is", fahrenheit, "degress Fahrenheit.")
    
    if fahrenheit >= 90:
        print("It's really out out there, be careful! Drink some water.")
        
    if fahrenheit <= 30:
        print("Brrrr. Be sure to dress warmly.")
        
    print("The program is done.")
In [10]:
temp_convert2()
What is the Celsius temperature? -4
The temperature is 24.8 degress Fahrenheit.
Brrrr. Be sure to dress warmly.
The program is done.
In [8]:
fahrenheit = 120
fahrenheit >= 90
Out[8]:
True
In [ ]: