Menu Close

Celsius to Fahrenheit [Python] …ftc

Write a program to Convert the temperature from Celsius to Fahrenheit.

Input:
Celsius = 0 

Output:
Fahrenheit = 32 F
Celsius = int(input("Celsius:  "))

Fahrenheit = Celsius*(9/5)+32   
# if its to find celsius, 
# then Celsius = Fahrenheit*(5/9)-32

print("Celsius to Fahrenheit:  ",Fahrenheit,"F")

INPUT_1:
Celsius:  0

OUTPUT:
Celsius to Fahrenheit:  32.0 F


INPUT_2:
Celsius:  30

OUTPUT:
Celsius to Fahrenheit:  86.0 F


INPUT_3:
Celsius:  40

OUTPUT:
Celsius to Fahrenheit:  104.0 F


INPUT_4:
Celsius:  50

OUTPUT:
Celsius to Fahrenheit:  122.0 F


ILLUSTRATION

Executed using python3 in linux terminal