# Author:
# Date: 
# Exam 0, Problem 3 (5 of 20 points)

""" Long ago, I was taught the following rhyme to help understand temperatures
in Celsius:
   
   30 is hot
   20 is nice
   10 put a coat on
   0 is ice
   
This program further helps Fahrenheit users by converting a temperature given
in degrees Fahrenheit to Celsius and printing a relevant line of the above
rhyme with the temperature in place of the original one from the rhyme.

For example, given 68 Fahrenheit as input, the program would determine that
this is equivalent to 20.0 degrees Celsius, and print "20.0 is nice".

The program's output is specified in the following table:
...............................................................
: Temperature  :                    Output                    :
:..............:..............................................:
: world record : [C] would be a world record. Are you sure?   :
: 25 or above  : [C] is hot                                   :
: 15 or above  : [C] is nice                                  :
: above 0      : [C] put a coat on                            :
: 0 or below   : [C] is ice                                   :
:..............:..............................................:

In the above table, [C] is a placeholder for the converted tempterature.
If a temperature satisfies multiple rows of the table, the program should
give the output from the first (topmost) line that is satisfied.

Some useful numbers:
- If F is a temperature in Fahrenheit then the corresponding temperature in
  Celsius is calculated as:
  
      C = 5/9 (F - 32)

- The world records for hottest and coldest temperatures recorded, in degrees
  Fahrenheit, are +134.1 F and -128.6 F

Some sample outputs:
>>> %Run p1.py 68
20.0 is nice

>>> %Run p1.py 41
5.0 put a coat on

>>> %Run p1.py 60
15.555555555555557 is nice

>>> %Run p1.py 212
100.0 would be a world record. Are you sure?

Write your code below:
"""

import sys

deg_f = float(sys.argv[1])

deg_c = 5 / 9 * (deg_f - 32)


if deg_f > 134.1 or deg_f < -128.6:
    print(deg_c, "would be a world record. Are you sure?")

else:
    if deg_c >= 25:
        print(deg_c, "is hot")
    elif deg_c >= 15:
        print(deg_c, "is nice")
    elif deg_c > 0:
        print(deg_c, "put a coat on")
    else:
        print(deg_c, "is ice")
