Function wont work :( | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Function wont work :(

Function wont work :( Celsius = int(input("celsius: ")) Def conv(c): C= 9/5 * celsius + 32 Conv(c) Fahrenheit = (c) Print ("Fahrenheit: " , fahrenheit) Whats wrong here? :(

27th Sep 2021, 12:57 PM
עמנואל מחשבים
3 Respuestas
+ 4
1. Python is case sensitive. It's "def" and "print". Also one time you use "conv" and one time "Conv". 2. The body of the function definition has to be indented. 3. Your function needs a return statement. 4. You're calling the function without assigning the result to a variable or using it in any way.
27th Sep 2021, 1:08 PM
Simon Sauter
Simon Sauter - avatar
+ 1
Ok thanks I think i got it :) celsius= int(input("celsius: ")) def conv(f): print ("fahrenhit" , f) conv(9/5 * celsius + 32)
27th Sep 2021, 1:40 PM
עמנואל מחשבים
0
Its hard to remember but i will try 😂
27th Sep 2021, 1:40 PM
עמנואל מחשבים