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:
- WAP to display a message on screen
- C Program to Extract a Portion of String
- WAP to print the truth table for XY+Z
- C Program to Design Love Calculator
- WAP to find the average of list of numbers entered by the user
- Python Examples
- WAP to find the divisors of a positive Integer
- How many Centimeters in a Foot through Python?
- How to Find Square Root in Python?
Leave a Comment on this Post