Write Python code  convert temperature from Fahrenheit to Celsius-

Answer-

Code-

#user enter temperature in fahrenheit
fahrenheit = float(input("Please enter temperature in fahrenheit: "))
# formula that convert temperature from Fahrenheit to Celsius
#Celsius = (Fahrenheit – 32) * 5/9
celsius = (fahrenheit - 32) * 5/9
print('Fahrenheit temperature %.2f  in Celsius is : %0.2f Celsius' %(fahrenheit, celsius))

Output-

Please enter temperature in fahrenheit: 200

Fahrenheit temperature 200.00  in Celsius is : 93.33 Celsius

Comments

Popular posts from this blog

The python program allows the user to enter the Sales amount and Actual cost of a Product. Next, Python calculates the Loss Amount or profit Amount based on those two values using if-elif-else Statement

Mealy and Moore Machine

Question Bank of Theory of Automata & Formal Languages