Guest User

Untitled

a guest
Nov 24th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class Dog:
  2. def __init__(self,race):
  3. self.race = race
  4. def info(self, name, age, sex, color):
  5. print ("%s is a %s year old %s dog. He is a %s %s."%(name, age, sex, color, self.race))
  6. def bark(self):
  7. print ("Wooow!")
  8.  
  9. D = Dog('Labrador')
  10. D.info('Milo', 4, "male", "chocolat")
  11. print ("Milo confirms in saying:")
  12. Dog.bark("")
Add Comment
Please, Sign In to add comment