SyntaxError: invalid syntax whiteeagle@whiteeagle-desktop:/media/Storage/PyBackup$ python temperature.py File "temperature.py", line 6 print f "degrees Fahrenheit"; ^ SyntaxError: invalid syntax
#Converts Celsius to Fahrenheit as well as Fahrenheit to Celsius def c_to_f(): f = int(raw_input("Temperature in Celsius please: ")) f = (c-32)/1.8; print f "degrees Fahrenheit"; break def f_to_c(): c = int(raw_input("Temperature in Fahrenheit please: ")) c = (f*1.8)+32; print c "degrees Celsius"; break def menu_2(): print "What do you want to do?"; print "1. Convert Celsius to Fahrenheit."; print "2. Convert Fahrenheit to Celsius."; print "Any other key to return to the main menu."; def main_menu(): print "Would you like to do a conversion? Y or y to confirm. "; while 1: main_menu() x = raw_input("Menu choice please: ") while x == "y" or x == "Y": menu_2() y = raw_input("Menu choice please: ") if y == 1: c_to_f() if y == 2: f_to_c() else: break else: break else: print "Goodbye."; break