Introduction to classes 9/18


My code seems to be correct but it doesn't pass.
Is there a bug on the french version of this exercise Please

class Animal(object):
    """Fait des animaux mignons."""
    est_vivant = True
    sante = "bonne"
    def __init__(self, nom, age):
        self.nom = nom
        self.age = age
    def description(self, nom, age):
        self.nom = nom
        self.age = age
hippo = Animal("Zox", 7)
paresseux = Animal("Zak", 2)
ocelot = Animal("Zoop", 5)
print hippo.sante
print paresseux.sante
print ocelot.sante

Oups, merci de réessayer. Votre code semble un peu étrange. Jetez un oeil à l'indice si besoin! 

And in the console it's correct :



Hi @snakefinger33gmail.c ,

There seems to be a bug in Codecademy's submission correctness test (SCT) for this exercise.

Add this, as a global function definition, to the end of your code, to pass ...

def aattr(*args):
    return True

Introduction to classes "Ils se multiplient" ex 9

Thanks a lot.
I found it on the forum before.
Happy Coding :sunglasses:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.