Use Python:
the formula for converting a temperature from Fahrenheit to Celcius is
C=5/9(f-32)
where F is the Fahrenheit temperatre and C is the celcius temperature. Write a function named celcius that accepts a Fahrenheit temperature as an argument. the function should return the temperature, convertedm to celcius. Demonstrate the function by calling it in a loop that displays a table of the fahrenheit temperatures 0 through 20 and their Celsius equivalents.
def celsius(Fahrenheit): return (Fahrenheit - 32) * (5/9) # Testing print("F\t\t C") print("-----------------------") for i in range(21): print(i,"\t\t",celsius(i))
Get Answers For Free
Most questions answered within 1 hours.