HOLA MUNDO estoy aprendiendo PHYTON helpĀ° tengo q completar | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 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
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