+ 2
Help me please
You are making a Celsius to Fahrenheit converter. Write a function to take the Celsius value as an argument and return the corresponding Fahrenheit value. Sample Input 36 Sample Output 96.8
6 Answers
+ 11
I Think first you try to solve with yours š
then you will try this
celsius = int(input())
def conv(c):
return (c*9/5)+32
fahrenheit = conv(celsius)
print(fahrenheit)
+ 9
Wijdene Madiouni Welcome š¤
+ 5
Wijdene Madiouni
x=float(input())
print(x*1.8+32)
#this works too
+ 3
Celsius=int(input())
The celsius to fahrenheit scale can be represented as 1.8 or 9/5. They both the same thing.
Therefore:
Fahrenheit = (celsius * 1.8) + 32
Or
Fahrenheit = (celsius * 9/5) + 32
print(Fahrenheit)
+ 3
Wijdene Madiouni welcome
+ 2
Vaibhav Singh Romie thanks a bunch ā¤ļø