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

18th Sep 2021, 2:35 PM
Lucía llamoza Gamboa
Lucía  llamoza Gamboa - avatar
2 Réponses
+ 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
18th Sep 2021, 2:57 PM
Python Learner
Python Learner - avatar
0
It is: return maxi
18th Sep 2021, 2:47 PM
Paul
Paul - avatar