- create class Dog
- identity - name
- state/attributes - breed, color, age
- behaviors - bark, sleep, eat
5.create 4 object of Dog class and get all attributes and behaviour as output.
=============================================================
i have one doubt
when i use like this code
def bark(self):
print(self.name, " is barking")
def sleep(self):
print(self.name, " is sleeping")
def eat(self):
print(self.name, " is eating")
But output i am getting like NONE. may i know why it happen like this?
Max is a Black , Labrador who is 1 years old.
Max is barking
None
Max is sleeping
None
Max is eating
None
2 Likes
But when i am running it in the way you have doubt.
The output is coming correctly.