Articles

Program to convert celsius to fahrenheit in python

Program to convert celsius to fahrenheit in python


In this python programming guide, we will learn to:

  • write a program to convert celsius to fahrenheit in python

You can check our video tutorial on program to convert celsius to fahrenheit in python:

 


Program to convert temperature from Celsius to Fahrenheit in Python

The program to convert temperature from celsius to fahrenheit is as follows:

 

# Owner : TutorialsInhand Author : Devjeet Roy

c = float(input("Enter temperature in C-Scale: "))

f = (c * 9)/5 + 32

print("The tempeature in F-Scale:",round(f,2))

The output of program to convert temperature from celsius to fahrenheit in python is as follows:

 

PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter temperature in C-Scale: 12
The tempeature in F-Scale: 53.6

Few important tips about this program

1. We take the user input and convert it to float data type.

2. Then we use the formula, C/5 = (F-32)/9 to find the temperature in F Scale.

3. Lastly, we round off the answer upto 2 decimal places.

 

Write a program to convert temperature from celsius to fahrenheit in python snapshot:

write a program to convert temperature from celsius to fahrenheit in python

This wraps up our session on program to convert celsius to fahrenheit in python.


Python Conversion Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :    Published Date : Nov 27,2022  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!