File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change 11class Perro ():
2- def __init__ (self , nombre , color ,raza ):
3- self .nombre = nombre
4- self .color = color
5- self .raza = raza
6- self .comida = 10
2+ def __init__ (self , nombre , color , raza ):
3+ self .nombre = nombre
4+ self .color = color
5+ self .raza = raza
6+ self .comida = 10
7+
8+ def dormir (self ):
9+ return 'zZZZzzzZZZzzzZZZ'
710
811 def ladrar (self ):
9- return 'El perro dice wuao wuao'
12+ return 'El perro dice wuao wuao'
1013
1114 def comer (self , cantidad ):
1215 self .comida = self .comida - cantidad
@@ -15,12 +18,12 @@ def comer(self, cantidad):
1518
1619if __name__ == '__main__' :
1720 perro = Perro ('Lucas' , 'Negro' , 'Bulldog' )
18-
21+
1922 croquetas = int (input ('¿Cuantas croquetas va a comer el perro? \n ' ))
20-
23+
2124 if croquetas < 10 :
22- print ('El perro comio ' + str (croquetas )+ ' croquetas.' + 'Ahora al Perro le quedan ' + str (perro .comer (croquetas ))+ ' croquetas.' )
25+ print ('El perro comio ' + str (croquetas )+ ' croquetas.' + 'Ahora al Perro le quedan ' + str (perro .comer (croquetas ))+ ' croquetas.' )
2326 else :
2427 print ('¡El perro No puede comer tantas Croquetas!' )
2528
26- # https://platzi.com/comentario/2224673/
29+ # https://platzi.com/comentario/2224673/
You can’t perform that action at this time.
0 commit comments