+ 2

What's the problem with this code can anyone plz explain?😐

celsius = int(input()) def conv(c): #your code goes here fahrenheit =conv(9/5*celsius)+32 print(fahrenheit) return fahrenheit

24th Apr 2021, 6:34 PM
Muhtasinul
Muhtasinul - avatar
2 odpowiedzi
+ 4
Muhtasinul Why you are printing value as well as returing also. Either you print value in function or return value in function then print function.
24th Apr 2021, 6:56 PM
A͢J
A͢J - avatar
+ 3
Change your code to celsius =int(input) def conv(c): return 9/5*celsius+32 fahrenheit = conv(celsius) print(fahrenheit) Next time return value in function before printing it
24th Apr 2021, 7:42 PM
Oladimeji Elijah
Oladimeji Elijah - avatar