+ 1

Def problem, plz help, thank you

celsius = int(input()) def conv(c): print(9/5*c+32) #your code goes here fahrenheit = conv(celsius) print(fahrenheit) #may i ask why there is a none in the output??

1st Jun 2022, 4:08 AM
Cham Sum Lau
2 Answers
+ 4
because the `conv` function does not return a value, so by default it returns None every time is called. To fix this just modify the line as: `return 9/5*c+32`
1st Jun 2022, 4:52 AM
Ervis Meta
Ervis Meta - avatar
+ 4
Because you directly print the value in the function and didn't return the value so on the last line it prints none For correction instead of print function you can use return statement in function
1st Jun 2022, 4:53 AM
Somya
Somya - avatar