Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Lion:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- print("Arrr " + str(x) + " " + " " + str(y))
- class Dog:
- def __init__(self, x, y):
- self.x = x
- self.y = y
- print("Woof " + str(x) + " " + " " + str(y))
- def createAnimals(animalClass, count):
- for i in range(count):
- animalClass(5, 4)
- createAnimals(Lion, 8)
- createAnimals(Dog, 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement