I wrote this code below for degree conversion but it doesn't work
Could the problem be that you can't put more than one return in a function ? print("Greetings!\nOptions:\nPress 1 to enter degree in Celsius\nPress 2 to enter degree in Fahrenheit\nPress 3 to enter degree in Kelvin") choice = int(input("Enter your choice")) def converter(num): if choice == 1 : kelvin = num + 273.15 fahrenheit = 1.8 * num + 32 return "The degree you entered is:", kelvin, " in Kelvin and", fahrenheit,"in Fahrenheit" elif choice == 2 : celsius = (num - 32)/1.8 kelvin = celsius + 273.15 return "The degree you entered is:", kelvin, " in Kelvin and", celsius,"in Celsius" elif choice == 3 : celsius = num - 273.15 fahrenheit = (celsius)*1.8 + 32 return "The degree you entered is:", celsius, " in Celsius and", fahrenheit,"in Fahrenheit" elif choice > 3 : return "Option invalid" x = int(input("Enter a number")) print(converter(x))