Wally = Gator("Wally", "Hanna Barbera Gator", "large children", 11) print(Wally) Wally.feed() Cuddles = Gar("Cuddles", "Eastern Brim Killer Gar", "Nemo", 12) print(Cuddles) Cuddles.feed() Pickles = Beaver("Pickles", "Angry Beaver", "steroids", 13) print(Pickles) Pickles.feed() JabberJaws = Shark("Jabber Jaws", "Great White Shark", "bachelorettes", 14) print(JabberJaws) JabberJaws.feed() Mechazilla = Godzilla("Mechazilla", "Robot", "a cold fusion reactor", 15) print(Mechazilla) Mechazilla.feed() def report_animals_by_attractions(*attractions): for attraction in attractions: print(f'{attraction.attraction_name} is where you can find {attraction.description} ') for animal in attraction.animals: print(f'* {animal.name} the {animal.species}.') varmint_village = PettingZoo("Varmint Village") varmint_village.animals.extend([Bartholomew, Lassie, Fluffy, Beaudreaux, Tank])
def main(): petting_zoo = PettingZoo('Petting Zoo', 'Pet Pet Pet') snakepit = Snakepit("Creepy Crawlers", "Keep your hands outside of the tanks") aquarium = Wetlands("Awesome Aquatics", "Sharks, Whales, and Tunas Oh MY") miss_fuzz = Llama("Miss Fuzz", "Domestic Llama", "Morning", "Grass", 92549) george = Monkey("George", "Howler Monkey", "Afternoon", "Bananas", 39181) gregory = Giraffe("Gregory", "Spotted Giraffe", "Midday", "Carrots", 76876) donnie = Donkey("Donnie", "Catalan Donkey", "Morning", "Hay", 23648) helen = Horse("Helen", "Arabian Horse", "Afternoon", "Apples", 54921) randy = Rattlesnake("Randy", "Texas Rattlesnake", "Mice", 81625) mary = Mamba("Mary", "Black Mamba", "Gerbils", 71603) vinnie = Viper("Vinnie", "Viper", "Lizzards", 49816) kerry = Kingsnake("Kerry", "King Snake", "Turtle Eggs", 19254) carlos = Cobra("Carlos", "King Cobra", "Hamster", 12345) debra = Dolphin("Debra", "Striped Dolphin", "Squids", 5678) walker = Whale("Walker", "Killer Whale", "Penguins", 41376) sarah = Shark("Sarah", "Great White Shark", "Seals", 59175) gary = Goldfish("Gary", "Lionhead Goldfish", "Fish Food", 28922) tina = Tuna("Tina", "Blackfin Tuna", "Shrimp", 43819) petting_zoo.append_animal(miss_fuzz) petting_zoo.append_animal(george) petting_zoo.append_animal(gregory) petting_zoo.append_animal(donnie) petting_zoo.append_animal(helen) petting_zoo.append_animal(debra) # Will Not Append. snakepit.append_animal(randy) snakepit.append_animal(mary) snakepit.append_animal(vinnie) snakepit.append_animal(kerry) snakepit.append_animal(carlos) snakepit.append_animal(helen) # Will Not Append. aquarium.append_animal(debra) aquarium.append_animal(walker) aquarium.append_animal(sarah) aquarium.append_animal(gary) aquarium.append_animal(tina) aquarium.append_animal(randy) # Will Not Append. for animal in petting_zoo.animals: print( f'You can find {animal.name} the {animal.species} in {petting_zoo.name}' ) for animal in snakepit.animals: print( f'You can find {animal.name} the {animal.species} in {snakepit.name}' ) for animal in aquarium.animals: print( f"You can find {animal.name} the {animal.species} in {aquarium.name}" ) donnie.chipnum = 12334 print(donnie.chipnum) print(aquarium.last_critter_added) print(carlos) donnie.feed() randy.feed() sarah.feed() sarah.swim()