Saturday, 14 September 2024

Practical - 58 - Write a Python program to take temperature in Celsius as input and convert it to Fahrenheit.

Practical - 58 - Write a Python program to take temperature in Celsius as input and convert it to Fahrenheit.


Ans:

C=float(input("Enter the temperature in Celsius: "))

F=1.8*C+32

print("Temperature in Fahrenheit=", F)

 

Output:

Enter the temperature in Celsius: 37

Temperature in Fahrenheit= 98.6


No comments:

Post a Comment