Python Program to Convert Celsius To Fahrenheit

Posted in

Python Program to Convert Celsius To Fahrenheit

Vinay Khatri
Last updated on August 4, 2022

    In this article, we have provided a python program which accepts temperature in Celsius and convert it into Fahrenheit.

    Prerequisite topics to create this program.

    • Python Input, Output
    • Python Data types
    • Python Operators

    Steps

    • First, we ask the user to enter the temperature value in Celsius.
    • Then using the formula celsius * 1.8 = fahrenheit – 32, we compute the value of ferenheit.
    • At last, using the print function we display the value of Fahrenheit.

    Python Program to Convert Celsius To Fahrenheit

    celsius = float(input("Enter Tempreture : "))
    fahrenheit = (celsius * 1.8) + 32
    print('There are {0:.2f} Fahrenheits in {1:.2f} Celsius'.format(fahrenheit,celsius))

    Output:

    Enter Tempreture : 42
    There are 107.60 Fahrenheits in 42.00 Celsius

    People are also reading:

    Leave a Comment on this Post

    0 Comments