def myfun(): celsius=float(input("Enter temperature in Celsius: ")) # Conversion formula: Fahrenheit = (Celsius * 9/5) + 32 fahrenheit=(celsius*9/5)+32 print(celsius," degrees Celsius is equal to ",fahrenheit," degrees Fahrenheit") if __name__=="__main__": myfun()
Enter temperature in Celsius: 28
28.0 degrees Celsius is equal to 82.4 degrees Fahrenheit