- 10
How to convert temperature from Celsius to Fahrenheit In python.
14 ответов
+ 12
Actually, the formula is provided on the question page. You just have to copy and paste into the function.
https://code.sololearn.com/cmb1VX4r61pq/?ref=app
+ 4
celsius = int(input())
def conv(c):
f= ((9/5)* c) + 32
return f
fahrenheit = conv(celsius)
print(fahrenheit)
+ 1
c=float(input())
fahrenheit= (9/5*c)+32
print (fahrenheit)
0
I actually got it right by mistake
I was defining conv(x) as print(9/5 * x + 32)
This would return the correct answer and then none. Not what we want.
So i tried to investigate why the correct answer would print followed by none.
I ran the code with the comment and BOOOM! PASS!
and I was like. no I didn't. why did this work? I investigated my accidental win. It turns out the code was printing conv(celsius) in other words it was printing print(9/5 * celsius + 32)
Printing a print statement hmmmmm
XD
- 1
celsius = int(input())
def conv(c):
# Your code goes here
fahrenheit= ((9/5)* c) + 32
return fahrenheit
fahrenheit = conv(celsius)
print(fahrenheit)
- 1
other form to complete the challenge is
#includecholo conversor de grados celsius a fahrenheit
celsius=int(input())
def conv(celsius):
vl1=9/5*celsius+32
result=vl1
print(result)
conv(celsius)
finally the result is the grades fahrenheit
- 1
celsius = int(input())
def conv(c):
#your code goes here
f = (9/5) * c + 32
return f
fahrenheit = conv(celsius)
print(fahrenheit)
Ask if u have some questions!
- 1
celsius = int(input()) #taking input from the user
def conv(c): #defining our function
# Your code goes here
fahrenheit= ((9/5)* c) + 32
return fahrenheit
fahrenheit = conv(celsius) #calling our function
print(fahrenheit) #take care of indentation in your code
- 2
The formula is this: F = C * 9 / 5 + 32. It's not that hard, try to do it yourself
- 2
Easy code 👌
celsius = int(input())
f = (celsius * 9/5) + 32
print(f)
- 2
Bro,
celsius = int(input())
f = (celsius * 9/5) + 32
print(f)
- 2
celsius = int(input())
def conv(c):
#your code goes here
return 9/5 * c + 32
fahrenheit = conv(celsius)
print(fahrenheit)
- 2
celsius = int(input())
def conv(c):
return 9/5*c+32
fahrenheit = conv(celsius)
print(fahrenheit)