Computer Science, asked by DORAEMONDA5253, 1 year ago

Write a program in python to convert fahrenheit to celsius

Answers

Answered by dhruvbadaya1
0

# Python Program - Convert Fahrenheit to Celsius

print("Enter 'x' for exit.");
fah = input("Enter Temperature in Fahrenheit: ");
if fah == 'x':
exit();
else:
fahrenheit = float(fah);
celsius = (fahrenheit-32)/1.8;
print("Temperature in Celsius =",celsius);

Answered by fiercespartan
6

Hey there!!

It's simple if you know the formula for the conversion:

here you go:

f_input = int(input('Enter the Fahrenheit:'))

print((f_input - 32) * 5/9)

Hope it helps! :)

Similar questions