Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Dog:
- def __init__(self,race):
- self.race = race
- def info(self, name, age, sex, color):
- print ("%s is a %s year old %s dog. He is a %s %s."%(name, age, sex, color, self.race))
- def bark(self):
- print ("Wooow!")
- D = Dog('Labrador')
- D.info('Milo', 4, "male", "chocolat")
- print ("Milo confirms in saying:")
- Dog.bark("")
Add Comment
Please, Sign In to add comment