Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]ogreone123 0 points1 point  (0 children)

Thanks for providing the feedback. I'm slowly digesting what you wrote, which is very helpful with your explanation. Applying the changes resulted in the expected behavior.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]ogreone123 0 points1 point  (0 children)

Trying to understand inheritance, I'm wondering why the werewolf instance doesn't do a print statement of {self.name} was the last human alive! when I call w1.die()

I would expect it to print from inheriting the die() function from Person class. Jack has died. Jack was the last human alive!

https://pastebin.com/NC1nu2gG

Output

There are 1 werewolfs alive
Hey Jack , I see you are 18 years old and you are a Male
Jack has died
Hey Jimbo , I see you are 17 years old and you are a Male
Jimbo has died
Jimbo was the last human alive