HW 3

WARNING: this HW requires the textbook reading! We have not yet discussed this HW topic in class, so you must comprehend the reading to write this short program.

  1. Read Chapter 3 up to and including "Nested Conditionals".

  2. Programming:
    Write a program called temperature.py that asks the user for the current temperature and determines if it is freezing or not. If freezing, it calculates how much it needs to warm up. Three example runs:

    What is the current temp in F? 30
    Freezing!!
    You need 3 more degrees!
    What is the current temp in F? -10
    Freezing!!  
    You need 43 more degrees!
    What is the current temp in F? 60
    At least it's not freezing!

    Submit your temperature.py to the online submission system under hw3-ifs.
    Your output must exactly match the above.

    submit -c=sd211 -p=hw3-ifs temperature.py