Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)
I want a USER INPUT code in python 3.4 that transforms Celsius into Fahrenheit. Where the client enters a Celsius number and It transforms into a Fahrenheit degree.

1 Answer

0 votes
by (26.4k points)

Look at the below code:

celsius = float(input("Enter temperature in celsius: "))

fahrenheit = (celsius * 9/5) + 32

print('%.2f Celsius is: %0.2f Fahrenheit' %(celsius, fahrenheit))

Also, try the following code:

# Name

Name = raw_input("Enter name= ")

# Enter fDegree value

F = input("enter Fah Degree value= ")

# Calculation for cDegree

C = (5.00/9.00)*(F-32.00)`#formula`

print "The input Fdegress= {:.2f}".format(F)

print "Celsius Degree = {:.2f}".format(C)

Interested to learn the concepts of Python in detail? Come and join the python course to gain more knowledge in Python

Related questions

0 votes
1 answer
asked Mar 17, 2021 in Python by laddulakshana (16.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...