read the temperature in Celsius and convert in fahrenheit by using python
Answers
Answered by
0
c = float(input("Enter the temp in Celsius:- ")
f = (c * 9/5) + 32
print (f"temp in Fahrenheit :- {f}")
Answered by
0
Python program and the output for the above question is listed below:
Output:
If the user input as 5, then the output is 41.
If the user input as 1, then the output is 33.8
Explanation:
Celsius =float(input("enter the value of Celsius: "))#Take the value from the user.
print("The value of Fahrenheit of the",Celsius,"°C is: ",Celsius*(9/5)+32,"°F")#Print the value of Fahrenheit.
Code Explanation :
- The above code is in python language, in which the first line is used to instruct the user and take the input and store it into the Celsius variable after converting it into the float.
- Then the value of a Fahrenheit will be printed with the help of print function after calculating with the help of predefined Fahrenheit formula.
Learn More :
- Python : https://brainly.in/question/14689905
Similar questions