0
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 Antworten
+ 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