Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
HOLA MUNDO estoy aprendiendo PHYTON helpĀ° tengo q completar
def mayorDeTres(a,b,c): if (a>=b): if ( ): maxi = a else: if (b>=c): maxi = else: maxi = c else: if (b>=c): maxi = else: maxi = c return yo lo resolvi asi : def mayorDeTres(a,b,c): if (a>=b): if (a>=c): maxi = a else: if (b>=c): maxi = b else: maxi = c else: if (b>=c): maxi = b else: maxi = c return mayorDeTres
2 Respostas
+ 1
Hola LucĆa!
I don't have much knowledge in Spanish. So, I'm sharing my answer in English.
Here, you have to return variable maxi, an assigned value.
But, it doesn't print any value since there's no print statement. For that, you can use a print statement outside function with some defined parameters if it's necessary. So, the two lines need to be like this,
return maxi
print(mayorDeTres(1,2,3))
Output: 3
0
It is:
return maxi