18 Herencia


<Below this line, add a link to the exact exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
¡Uy! Probá otra vez. ¿Creaste una clase llamada ‘Equilatero’?
<What do you expect to happen instead?>


class Triangulo(object):
numero_de_lados = 3
def init(self, angle1, angle2, angle3):
self.angle1 = angle1
self.angle2 = angle2
self.angle3 = angle3
def revisar_angulos(self):
if self.angle1+ self.angle2+ self.angle3==180:
return True
return False
class Equilatero(Triangulo):
angulo = 60
def init(self):
self.angle1 = angulo
self.angle2 = angulo
self.angle3 = angulo

mi_triangulo = Triangulo(90, 30, 60)
print mi_triangulo.revisar_angulos()

<do not remove the three backticks above>


Change all instances of angle_ to angulo_.


        self.angulo1 = self.angulo

Likewise for the other two.