+ 2
Celsius & Fahrenheit
https://code.sololearn.com/c8A21A5a101A/?ref=app What is wrong with this code ?
8 Antworten
+ 5
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
+ 1
you can have a one-line code, using the walrus operator (if i remember it's name correctly),
print(cels := (int(input()) * 9 / 5) + 32 )
0
Jan Markus Kunevich Evgeniyy Evgenievich
guys my code is correct but the test ask me to write an input 0 to have an output 32,0 and i dont know how to do it
0
Jan Markus Kunevich Evgeniyy Evgenievich
guys my code is correct but the test ask me to write an input 0 to have an output 32,0 and i dont know how to do it
0
I can give you easier code:(f-Fahrenheit).
celsius = int(input())
f = (celsius * 9/5) + 32
print(f)
0
MaryRif thanks I solved it
0
this is the right answer copy and paste or your project tnx
celsius = int(input())
def conv(c):
fahrenheit=9/5*celsius+32
return fahrenheit
fahrenheit = conv(celsius)
print(fahrenheit)
- 1
celsius = int(input())
def conv(celsius):
#your code goes here
return 9/5*celsius + 32
fahrenheit = conv(celsius)
print(fahrenheit)