Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Duck:
- def quack(self):
- print("Quaaaaaack!")
- def feathers(self):
- print("The duck has white and gray feathers.")
- class Person:
- def quack(self):
- print("The person imitates a duck.")
- def feathers(self):
- print("The person takes a feather from the ground and shows it.")
- def name(self):
- print("John Smith")
- def in_the_forest(duck):
- duck.quack()
- duck.feathers()
- def game():
- donald = Duck()
- john = Person()
- in_the_forest(donald)
- in_the_forest(john)
- game()
Add Comment
Please, Sign In to add comment