# convert.py # # Sample python program from texbook, pg 28. # Asks user for Celsius temperature, then prints Fahreneit conversion. # # One problem with this is that it crashes # if the user types something unexpected "hi" or "12,3" # def main(): celsius = input("What is the Celsius temperature? ") fahrenheit = (9.0 / 5.0) * celsius + 32 print "The temperature is ", fahrenheit, " degrees Fahrenheit." main()