codescracker


python

Python Program to Convert Celsius to Fahrenheit



« Previous Program Next Program »


Convert Celsius to Fahrenheit in Python

To convert temperature from Celsius to Fahrenheit in python, you have to ask from user to enter the temperature in Celsius to convert that temperature into Fahrenheit as shown in the program given below.

Python Programming Code to Convert Celsius to Fahrenheit

Following python program ask from user to enter Celsius to convert it into Fahrenheit:

# Python Program - Convert Celsius to Fahrenheit
		
while True:
	print("Enter 'x' for exit.")
	cel = input("Enter Temperature in Celsius: ")
	if cel == 'x':
		break
	else:
		celsius = float(cel)
		fahrenheit = (1.8*celsius) + 32
		print("Temperature in Fahrenheit =",fahrenheit,"\n")

Here is the sample run of the above Python program to illustrate how to convert Celsius to Fahrenheit temperature:

python convert celsius to fahrenheit

Same Program in Other Languages

You may also like to learn or practice the same program in other popular programming languages:


« Previous Program Next Program »




Tools
Calculator

Quick Links
Signup - Login - Give Online Test