def main(): varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle") slither_inn = SnakePit('Slither Inn', "stupendous snakes of all sizes") bubbling_brook = Wetlands('Bubbling Brook', "feathery and wet critters") dolly = Llama("Dolly", "miniature llama", "morning", "hay", 1033) snappy = RattleSnake("Snappy", "American RattleSnake", "frogs", 1044) donald = Duck("Donald", "Animated Duck", "Duck Food", 123) varmint_village.add_animal_pythonic(dolly) varmint_village.add_animal_pythonic(snappy) slither_inn.add_animal_pythonic(dolly) slither_inn.add_animal_pythonic(snappy) bubbling_brook.add_animal_pythonic(donald) bubbling_brook.add_animal_pythonic(snappy)
from animals import Carp, Catfish, Copperhead, CoralSnake, Cottonmouth, Crocodile, Donkey, Goat, Llama, Monkey, Python, RattleSnake, Seal, Tiger, Turtle from attractions import PettingZoo, SnakePit, Wetlands # Naming attractions varmint_village = PettingZoo('Varmint Village') the_slither_inn = SnakePit('The Slither Inn') critter_cove = Wetlands('Critter Cove') # Naming animals and adding them to Petting Zoo mizz_fuzz = Llama("Miss Fuzz", "domestic llama", "morning", "llama chow", 34) billy = Goat("Billy", "american pygmy", "midday", "goat chow", 12) tony = Tiger("Tony", "bengal tiger", "midday", "tiger chow", 32) george = Monkey("George", "spider monkey", "night", "monkey chow", 23) geoff = Donkey("Geoff", "donkey", "night", "donkey chow", 14) varmint_village.add(mizz_fuzz) varmint_village.add(billy) varmint_village.add(tony) varmint_village.add(george) varmint_village.add(geoff) # Naming animals and adding them to Wetlands bruce = Turtle("Bruce", "turtle", "turtle chow", 65) croc = Crocodile("Croc", "crocodile", "fish chow", 66) willy = Catfish("Willy", "blue catfish", "fish chow", 67) lucile = Seal("Lucile", "seal", "fish chow", 68) big_mouth = Carp("Big Mouth", "asian carp", "fish chow", 69) critter_cove.add(bruce) critter_cove.add(croc) critter_cove.add(willy) critter_cove.add(lucile) critter_cove.add(big_mouth)
kai_but_funnier = Cobra("Kai but Funnier", "cobra", "karate gi") numba_one = Taipan("Numba One", "taipan", "communism") #ANCHOR Create attractions pet_planet = Petting_Zoo( "Pet Planet", "Home the finest land animals Tennessee has ever seen, Pet planet offers to satiate your wildest petting zoo dreams." ) hissteria = Snake_Pit( "Hissteria", "All bite and no bark, these slithering sons of guns are precariously placed for your viewing pleasure. (anti-venom not included with admissions ticket)" ) lazy_river = Wetlands( "Lazy River", "This attraction might be lazy, but these wet'n'wild animals are anything but. When you come on down, don't forget to stop by our gift shop and pick up one of our Crazy Critter Collective™ brand ponchos to remember us by!" ) #ANCHOR Add animals to attractions pet_planet.animals.append(pango) pet_planet.animals.append(sonic) pet_planet.animals.append(yusuke) pet_planet.animals.append(knuckles) pet_planet.animals.append(captain_america) hissteria.animals.append(jetbrain) hissteria.animals.append(takamaki) hissteria.animals.append(kai_but_funnier) hissteria.animals.append(numba_one) hissteria.animals.append(number_five)
from animals import Goose, Turtle, Electric_Eel, Llama, Electric_Eel from attractions import Petting_Zoo, Snake_Pit, Wetlands honky = Goose("Honky", "bird", "seeds", 130) shelly = Turtle("Shelly", "turtle", "carrots", 167) farty = Electric_Eel("Farty", "electric eel", "babies", 154) crappy = Llama("Crappy", "llamma", "poop", "midday", 188) floppy = Electric_Eel("Floppy", "electric eel", "duck eyeballs", 149) varmint_village = Petting_Zoo("Varmint Village", "critters that like to dig and scurry") varmint_village.add_animal(honky) varmint_village.add_animal(shelly) swamp_town = Wetlands("Swamp Town", "slimy creatures that swim") swamp_town.add_animal(farty) varmint_village.add_animal_pythonic(crappy) varmint_village.add_animal_pythonic(floppy) for animal in varmint_village.animals: print(animal)
def feed(self): print( f'{self.name} was fed {self.food} on {date.today().strftime("%m/%d/%Y")}' ) @property def chip_number(self): return self.__chip_number @chip_number.setter def chip_number(self, num): pass critter_cove = Wetlands( "Wetlands", " Gatlinburg's only one-acre walk-through wetlands and wet bar, full of feathered friends and fantastic fish!" ) critter_cove.add_animals(quackers) critter_cove.add_animals(goldeen) critter_cove.add_animals(odette) critter_cove.add_animals(jinli) slither_inn = SnakePit("Slither Inn", "more snakes than an Indiana Jones movie ") slither_inn.add_animals(snakey) slither_inn.add_animals(mister_cobra) slither_inn.add_animals(monty) slither_inn.add_animals(b_sizzle) slither_inn.add_animals(chip)
henry = Hippo("Henry", "hippopotamus", "afternoon", "cereal", 856) george = Monkey("George", "chimpanzee", "morning", "banana", 527) flipper = Dolphin("Flipper", "wild dolphin", "afternoon", "plants", 2345) buddha = Starfish("Buddha", "golden starfish", "morning", "fish food", 6723) ed = Eel("Ed", "electric eel", "evening", "algae", 8976234) gus = Octopus("Gus", "wild octopus", "evening", "pond scum", 9087234) jerry = Goldfish("Jerry", "wild octopus", "morning", "fish food", 9873) carl = Copperhead("Carl", "copperhead snake", "morning", "mice", 987234) ren = Rat_Snake("Ren", "poisonous rattler", "afternoon", "mice", 234345) sally = Salamander("Sally", "domestic salamander", "afternoon", "plants", 1) charlie = Snail("Charile", "domestic snail", "afternoon", "bugs", 7) al = Alligator("Al", "dangerous gator", "afternoon", "anything", 43) varmint_village = PettingZoo("Varmint Village") slither_inn = SnakePit("Slither Inn") water_town = Wetlands("Water Town") slither_inn.add_animal(carl) slither_inn.add_animal(ren) slither_inn.add_animal(sally) slither_inn.add_animal(charlie) slither_inn.add_animal(al) varmint_village.add_animal(miss_fuzz) varmint_village.add_animal(tony) varmint_village.add_animal(ned) varmint_village.add_animal(henry) varmint_village.add_animal(george) water_town.add_animal(flipper) water_town.add_animal(buddha) water_town.add_animal(ed) water_town.add_animal(gus)
from animals import Copperhead, Coralsnake, Coy, Donkey, Duck from animals import Frog, Goat, Goldfish, Goose, Horse, Llama from animals import Moccassin, Python, Ratsnake, Sheep from attractions import Wetlands, SnakePit, PettingZoo varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle") slither_inn = SnakePit("Slither Inn", "slithering snakes and creepy crawlies") critter_cove = Wetlands("Critter Cove", "fins and feathers in all colors") miss_fuzz = Llama('Miss Fuzz', 'domestic llama', 'morning', 'grass', 12345) hee_haw = Donkey('Hee Haw', 'mountain donkey', 'midday', 'apples', 908790) satan = Goat('Satan', 'pygmy goat', 'afternoon', 'grass', 8654675) perm = Sheep('Perm', 'curly sheep', 'morning', 'grass', 837594) ed = Horse('Mr. Ed', 'Tennessee walking horse', 'midday', 'oats', 957983) cuddles = Ratsnake('Cuddles', 'Ratsnake', 'mice', 87676) kissy = Copperhead('Kissy', 'Copperhead', 'mice', 4657) monty = Python('Monty', 'python', 'rats', 665679) cotton = Moccassin('Cotton', 'cotton mouth', 'frogs', 356554) rainbow = Coralsnake('Rainbow', 'coral snake', 'roaches', 108375) tangerine = Goldfish('Tangerine', 'goldfish', 'fish flakes', 23987) waddle = Duck('Waddle', 'mallard', 'corn kernels', 487589) ki = Coy('Ki', 'coy', 'fish flakes', 87984) ribbit = Frog('Ribbit', 'bull frog', 'flies', 58769) the_devil = Goose('The Devil', 'goose', 'corn kernels', 63495) varmint_village.add(miss_fuzz) varmint_village.add(hee_haw) varmint_village.add(satan) varmint_village.add(perm) varmint_village.add(ed)
lucy = Diamondback("Lucy", "diamondback", "cashews", 2) donkeh = Donkey("Donkeh", "donkey", "morning", "waffles", 3) fsh = Fish_With_No_Eyes("Fsh", "fish with no eyes", "carrots", 4) g****e = Goat("G****e", "goat", "afternoon", "goat snacks", 5) silver = Goldfish("Silver", "goldfish", "Goldfish", 6) euryale = Gorgon("Euryale", "gorgon", "gorgonzola", 7) mav = Goose("Mav", "Canada goose", "watercress sandwiches", 16) peanut_butter = Jellyfish("Peanut Butter", "jellyfish", "sandwiches", 8) miss_fuzz = Llama("Miss Fuzz", "llama", "evening", "llamagranates", 9) mallory = Mallard("Mallory", "mallard", "mallort", 10) tang = Orangutan("Tang", "orangutan", "midnight", "Tang", 11) snat_rake = Rat_Snake("Snat Rake", "rat snake", "Rat Snacks(TM)", 12) maracas = Rattlesnake("Maracas", "rattlesnake", "rattlesnacks", 13) jaws = Shark("Jaws", "shark", "bigger boats", 14) little_sebastian = Small_Horse("Little Sebastian", "small horse", "sunrise", "hay-zelnuts", 15) varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle") snake_hole = SnakePit("The Snake Hole", "unlovable and slithery critters to avoid") soggy_bottoms = Wetlands("Soggy Bottoms", "wet and wild critters in your area") varmint_village.add([donkeh, g****e, miss_fuzz, tang, little_sebastian]) snake_hole.add([steve_url, lucy, euryale, snat_rake, maracas]) soggy_bottoms.add([fsh, silver, peanut_butter, mallory, jaws]) varmint_village.add_animal_type_check(mav) for animal in varmint_village.animals: print(animal)
varmint_village = PettingZoo("Varmint Village", "cuddly creatures") varmint_village.animals.append(miss_fuzz) varmint_village.animals.append(wilbur) varmint_village.animals.append(eeyore) varmint_village.animals.append(bugs) varmint_village.animals.append(bonnie) slither_inn = SnakePit("Slither Inn", "slithery creatures") slither_inn.animals.append(alex) slither_inn.animals.append(greg) slither_inn.animals.append(mary) # slither_inn.animals.append(bob) slither_inn.animals.append(gabe) critter_cove = Wetlands("Critter Cove", "waterbound buddies") critter_cove.animals.append(tim) critter_cove.animals.append(moriah) critter_cove.animals.append(patrick) critter_cove.animals.append(chuck) critter_cove.animals.append(steve) for animal in varmint_village.animals: print( f'You can find {animal.name} the {animal.species} in {varmint_village.attraction_name}' ) for animal in slither_inn.animals: print( f'You can find {animal.name} the {animal.species} in {slither_inn.attraction_name}' )
from animals import Cottonmouth from animals import Ratsnake from animals import Copperhead from animals import Goldfish from animals import RedFish from animals import BlueFish from animals import Catfish from animals import KoiFish from attractions import PettingZoo from attractions import SnakePit from attractions import Wetlands varmint_village = PettingZoo("Varmint Village") the_slither_inn = SnakePit("The Slither Inn") critter_cove = Wetlands("Critter Cove") JA = Donkey("JA", "donkey", "morning", "straw", 334) Black = Sheep("Black", "sheep", "afternoon", "hay", 123) Billy = Goat("Billy", "goat", "midday", "pellets", 456) Milkshake = Cow("Milkshake", "Cow", "morning", "grass", 765) RedRum = Horse("RedRum", "horse", "midday", "apples", 678) varmint_village.animals.extend([JA, Black, Billy, Milkshake, RedRum]) Noodles = Watersnake("Noodles", "watersnake", "fish", 198) Zoe = Rattlesnake("Zoe", "rattlesnake", "rabbit", 444) Snape = Cottonmouth("Snape", "cottonmouth", "salamander", 111) Buttercup = Ratsnake("Buttercup", "ratsnake", "shrew", 222) Sssssam = Copperhead("Sssssam", "copperhead", "mice", 555)
dude = SeaTurtle(6, "Dude", "domestic sea turtle") shocky = Eel(7, "Shocky", "domestic eel") towel = Dolphin(8, "Towel", "domestic dolphin") finn = Shark(9, "Finn", "domestic shark") boo = Whale(10,"Boo You Whale", "domestic whale") cheese = Ratsnake(11, "Cheese", "domestic ratsnake") bronze = Copperhead(12, "Bronze", "domestic copperhead") monty = Python(13, "Monty", "domestic python") shake = Rattlesnake(14,"Shake", "domestic rattlesnake") louis = Kingsnake(15, "King Louis", "domestic kingsnake") varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle") pit_of_doom = SnakePit("Pit of Doom", "cute and scaley critters") waterworld = Wetlands("Waterworld", "cute and wet critters") varmint_village.add_animal(mama) varmint_village.add_animal(billy) varmint_village.add_animal(waffles) varmint_village.add_animal(chris) varmint_village.add_animal(para) # varmint_village.add_animal(goose) pit_of_doom.add_animal(cheese) pit_of_doom.add_animal(bronze) pit_of_doom.add_animal(monty) pit_of_doom.add_animal(shake) pit_of_doom.add_animal(louis) waterworld.add_animal(dude)
from animals import Barreleye, Bird, Catfish, Donkey, Duck, Goat, Goldfish, Insect, King_Cobra, Kingsnake, Llama, Pig, Sheep, Snake, Whale from attractions import Petting_Zoo, Snake_Pit, Wetlands bassy = Barreleye('Bassy', 'fish', 'Morning', 'Fish chips', 12345) cotters = Bird('Cotters', 'shoebill', 'Evening', 'Bird Food') catty = Catfish('Catty', 'catfish', 'Afternoon', 'Fish Chips') dokay = Donkey('Dokay', 'amiatina', 'Morning', 'Donkey food') malaard = Duck('Malaard', 'mallard', 'Evening', 'Duck food') lebron = Goat('Lebron', 'goat', 'Afternoon', 'Goat food') goldie = Goldfish('Goldie', 'goldfish', 'Evening', 'Fish chips') scorpie = Insect('Scorpie', 'scorpion', 'Morning', 'Insect food') moonshine = King_Cobra('Moonshine', 'snake', 'Afternoon', 'Snake food') kingsby = Kingsnake('Kingsby', 'snake', 'Morning', 'Snake food') llavya = Llama('Llavya', 'llama', 'Evening', 'Llama food') pinky = Pig('Pinky', 'Duroc pig', 'Afternoon', 'Pig food') shep = Sheep('Shep', 'sheep', 'Morning', 'Sheep food') anex = Snake('Anex', 'anaconda', 'Evening', 'Snake food') swain = Whale('Swain', 'Humpback', 'Afternoon', 'Whale food') varmint_village = Petting_Zoo("Varmint Village", "Pet all you can!") reptilian_corner = Snake_Pit("Reptilian Corner", "Lots and Lots and Lots of Reptiles") the_wet_place = Wetlands("The Wet Place", "It's wet here.") varmint_village.add_animals( [dokay, cotters, malaard, lebron, llavya, pinky, shep, swain]) reptilian_corner.add_animals([scorpie, moonshine, kingsby, anex]) the_wet_place.add_animals([catty, goldie, swain]) print(the_wet_place)
sam = Garden_Snake("Sam", "Garden Snake", "tomatoes", "bugs", 987) errol = Earthworm("Errol", "Earthworm", "fertilizer", "dirt", 654) sal = Salamander("Sal", "Salamander", "flies", "bugs", 321) pippin = Python_Snake("Pippin", "Python Snake", "mouse","mice", 000) bruce = Boa_Snake("Bruce", "Boa Snake", "mouse", "rats", 54654) #swimming🐠 nemo = Fish("Nemo", "Fish", "morning", "plankton", 101010) alan = Alligator("Alan", "Alligator","afternoon", "steak", 788789) cedric = Seahorse("Cedric", "Seahorse", "afternoon", "plankton", 555666) fred = Frog("Fred", "Frog", "morning", "flies", 789321) pedro = Platypus("Pedro", "Platypus", "morning", "gummie bears", 5556666555) varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle") slither_inn = SnakePit("Slither Inn", "sleek and slithering creatures all around you") critter_cove = Wetlands("Critter Cove", "If it swims and can be caught, it's in here") varmint_village.add_animal(june) varmint_village.add_animal(johnny) varmint_village.add_animal(alan) slither_inn.add_animal(sam) slither_inn.add_animal(errol) slither_inn.add_animal(sal) slither_inn.add_animal(pippin) slither_inn.add_animal(bruce) critter_cove.add_animal(nemo) critter_cove.add_animal(alan) critter_cove.add_animal(cedric) critter_cove.add_animal(fred)
frogger = Frog("Frogger", "Green Frog", "midday", "Frog Chow", 45678) mr_toad = Toad("Mr. Toad", "Common Toad", "afternoon", "Toad Chow", 45679) donald = Duck("Donald", "American Pekin Duck", "morning", "Duck Chow", 56789) # Create a Goose bob = Goose("Bob", "Canada goose", "watercress sandwiches", 12341) bob.run() bob.swim() # Create an attraction varmint_village = PettingZoo("Varmint Village", "critters that like to dig and scurry") varmint_village.add_animal(bob) for animal in varmint_village.animals: print(animal) snake_pit = SnakePit("Snake Pit", "snakes and stuff") snake_pit.add_animal(bertha) for animal in snake_pit.animals: print(animal) wet_lands = Wetlands("Wetlands", "wide variety of animals in here") wet_lands.add_animal(nemo) for animal in wet_lands.animals: print(animal)
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()
benny = Frog('Benny', 'frog', 'manflesh', 8675309) lenny = Goat('Lenny', 'goat', 'dusk', 'manflesh', 123) vinny = Snake('Vinny', 'snake', 'mouseflesh', 324) connie = Duck('Connie', 'duck', 'dawn', 'gooseflesh', 909) johnny = Fish('Johnny', 'fish', 'fishflesh', 9) ronnie = Bull('Ronnie', 'bull', 'midnight', 'manflesh', 1011) lonny = Pigeon('Lonny', 'pigeon', 'anything', 666) yonni = Stork('Yonni', 'stork', 'fishflesh', 2244) donnie = Rabbit('Donnie', 'rabbit', 'dusk', 'carrotflesh', 42) bonnie = Snail('Bonnie', 'snail', 'unknown', 1307) keeter = Parakeet('Keeter', 'parakeet', 'snailflesh', 789) reeter = Rhino('Reeter', 'rhino', 'dusk', 'manflesh', 2) eatin_good = PettingZoo('Eatin Good') baller_crawler = SnakePit('Baller Crawler') wetty_already = Wetlands('Wetty Already') eatin_good.addAnimals(jenny, penny, lenny, ronnie, donnie, reeter) baller_crawler.addAnimals(kenny, benny, vinny, bonnie) wetty_already.addAnimals(connie, johnny, lonny, yonni, keeter) for animal in eatin_good.animals: print( f"{animal.name} is a good {animal.species} in {eatin_good.attraction_name}" ) for animal in baller_crawler.animals: print( f"{animal.name} is a good {animal.species} in {baller_crawler.attraction_name}" )