You are viewing a single comment's thread. Return to all comments →
This is how I did it, though I used range instead of a comparator in the amIOld method:
def amIOld(self): if self.age in range(13): print("You are young.") elif self.age in range(13, 18): print("You are a teenager.") else: print("You are old.")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: Class vs. Instance
You are viewing a single comment's thread. Return to all comments →
This is how I did it, though I used range instead of a comparator in the amIOld method: