Python program to convert Celsius to Fahrenheit
In this example, we will convert temperature in Celsius to Fahrenheit. To do this we will use the following formula
fah = ( cel * 1.8 ) + 32
#python program to convert Celsius to Fahrenheit
cel=float(input(‘Enter temperature in degree Celsius: ‘))
fah=(cel * 1.8) + 32
print(‘{0} degrees Celsius is equal to {1} degrees Fahrenheit’.format(cel,fah))
Output
Enter temperature in degree Celsius: 50
50.0 degrees Celsius is equal to 122.0 degrees Fahrenheit
If we want to convert Fahrenheit to celsius so we have to use the given formula
cel = ( fah – 32 ) / 1.8
fah=float(input(‘Enter temperature in degree Fahrenheit: ‘))
cel=(fah – 32) / 1.8
print(‘{0} degrees Fahrenheit is equal to {1} degrees Celsius’.format(fah,cel))
Output
Enter temperature in degrees Fahrenheit: 122
122.0 degrees Fahrenheit is equal to 50.0 degrees Celsius
Python Program to add two numbers
Python program to find Area of Square
Python program to find Area of Triangle
Python program to swap two variables
Python program to convert Celsius to Fahrenheit
Python program to generate Random Number
Python program to convert Miles to Kolometers
Python program to find Largest of 2 numbers
Python program to check if number is Odd or Even
Python program to check if number is Positive Negative or Zero
Python program to check Leap Year
Types of Loop in Python
Python program to check Prime Number
Python program to Calculate Sum of N Natural Numbers
Python program to find sum of All Even Number between 1 to 10
Python program to find sum of All Odd Number between 1 to 10
Python program to check Armstrong Number