+ 3

Temperature conversion

celsius = int(input()) def conv(c): #your code goes here if c==celsius: Y= 9/5 * celsius + 32 print(Y) fahrenheit = conv(celsius) print(fahrenheit) I can't remove the none from the answer, is there a way to remove none

4th Dec 2020, 5:00 PM
Ajewumi Emmanuel Ayomide
Ajewumi Emmanuel Ayomide - avatar
4 Answers
+ 8
Use conv(celsius ) only
4th Dec 2020, 5:04 PM
TOLUENE
TOLUENE - avatar
4th Dec 2020, 6:08 PM
Mr. Rahul
Mr. Rahul - avatar
+ 4
You are not returning anything from conv() function. In the 2nd last statement, you are accepting answer into Fahrenheit, and as your function isnt returning anything, Fahrenheit is assigned none. So either add a return statement in place of print in the function, or remove the print(Fahrenheit) statement. I hope u get what I'm saying.😅 I'm quite bad at explaining
4th Dec 2020, 5:13 PM
Charitra
Charitra - avatar
4th Dec 2020, 5:36 PM
Ajewumi Emmanuel Ayomide
Ajewumi Emmanuel Ayomide - avatar