Exercise 42 Study Drill

What have I to do in Exercise-42: Study Drill - 3
I am not able to understand what does it mean?

Hello @amisha12

I guess you could add methods to the class.
Methods are like functions

Count letters in the name is something that a method can do.

class Cat(Animal):

    def __init__(self, name):
        self.name = name

    def count_letters(self):
        return len(self.name)

my_cat = Cat(”Garfunkel”)

print(my_cat.count_letters())
# output = 9

I hope I didn’ t missunderstood the study drill.
If not in this exercise you will learn about methods later.

2 Likes

Thankyou for your help.