Пример #1
0
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)
Пример #2
0
from animals import Llama, Goat, Alpaca, Pony, Pig, Tadpole, Goldfish, Mallard, Goose, Frog, Snake, Turtle, Lizard, Viper, Boa
from attractions import PettingZoo, Wetlands, SnakePit





varmint_village = PettingZoo("The Varmint Village")

# remember, some animals may require more arguments than others; e.g. shift
dolly = Llama("Dolly", "miniature llama","morning", "hay")
snappy = Goldfish("Snappy", "American Alligator", "afternoon", "fish")

varmint_village.add_animal_pythonic(dolly)
varmint_village.add_animal_type_check(dolly)
varmint_village.add_animal_pythonic(snappy)





# fluffy_village = PettingZoo("Fluffy Village")
# varmint_village = PettingZoo("Varmint Village")
# wet_village = Wetlands("Wet Village")
# print(wet_village.description)


############

miss_fuzz = Llama("Miss Fuzz", "domestic llama", "morning", "Llama Chow" )
mr_fuzz = Goat("Mister Fuzz", "mountain goat", "morning", "Goat Chow")
Пример #3
0
from animals import Llama, Pig, Porcupine, Armadillo, Groundhog, Lawyers, Viper, Lobbyist, Python, Cobra, Gator, Gar, Beaver, Shark, Godzilla
from attractions import PettingZoo, WetLands, SnakePit
from animals import Goose

Bartholomew = Llama("Bartholomew", "3 legged Peruvian Llama", "midday", "small children", 1)
print(Bartholomew)
Bartholomew.feed()
print(f'{Bartholomew.name} the {Bartholomew.species} is available to pet during the {Bartholomew.shift} shift.')

Lassie = Pig("Lassie", "Tibetian Straight Tailed Pig", "morning", "the in-laws", 2)
print(Lassie)
Lassie.feed()
print(f'{Lassie.name} the {Lassie.species} is available to pet during the {Lassie.shift} shift.')

Fluffy = Porcupine("Fluffy", "Curmudgeonly Porcupine", "afternoon", "prozac", 3)
print(Fluffy)
Fluffy.feed()
print(f'{Fluffy.name} the {Fluffy.species} is available to pet during the {Fluffy.shift} shift.')

Tank = Armadillo("Tank", "Southern Yard Destroyer Armadillo", "morning", "a local golf course", 4)
print(Tank)
Tank.feed()
print(f'{Tank.name} the {Tank.species} is available to pet during the {Tank.shift} shift.')

Beaudreaux = Groundhog("Beaudreaux", "Louisiana Drunken Groundhog", "afternoon", "a hobo", 5)
print(Beaudreaux)
Beaudreaux.feed()
print(f'{Beaudreaux.name} the {Beaudreaux.species} is available to pet during the {Beaudreaux.shift} shift.')

Toby = Lawyers("Toby", "The Worst", "HR reports", 6)
print(Toby)
Пример #4
0
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)
Пример #5
0
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)
Пример #6
0
    "Chinchilla",
    "veggies",
)
gill = Goat(
    "gill",
    "Goat",
    "grain",
)
alfred = Alpaca(
    "alfred",
    "Alpaca",
    "hay",
)
larry = Llama(
    "larry",
    "Llama",
    "hay",
)
susan = Snake(
    "susan",
    "Snake",
    "pellet",
)
lulu = Lizard(
    "lulu",
    "Lizard",
    "pellet",
)
tayler = Turtle(
    "tayler",
    "Turtle",
Пример #7
0
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)
from animals import Boa, Catfish, Cornsnake, Donkey, Duck, Gecko, Goat, Iguana, Llama, Otter, Pig, Rabbit, Skink, Stingray, Turtle
from attractions import PettingZoo, SnakePit, Wetlands

miss_fuzz = Llama("Miss_Fuzz", "llama", "afternoon", "llama chow", 59)
print(
    f'{miss_fuzz.name} the {miss_fuzz.species} is available to pet during the {miss_fuzz.shift} shift.'
)
print(miss_fuzz.feed())

wilbur = Pig("Wilbur", "pot-bellied pig", "midday", "slop", 29)
print(wilbur.feed())

eeyore = Donkey("Eeyore", "donkey", "morning", "", 32)
print(eeyore.feed())

bugs = Rabbit("Bugs", "rabbit", "afternoon", "food", 116)

bonnie = Goat("bonnie", "goat", "midday", "grass", 789)

tim = Turtle("Tim", "box turtle", "morning", "bugs", 123789)

print(tim.chip_number)

moriah = Duck("Moriah", "mallard", "food", "afternoon", 1167)

patrick = Otter("Patrick", "otter", "food", "midday", 2345)

chuck = Catfish("Chuck", "catfish", "food", "morning", 5674)

steve = Stingray("Steve", "stingray", "food", "midday", 6785)
Пример #9
0
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)
Пример #10
0
from http.server import BaseHTTPRequestHandler, HTTPServer
from animals import Animal, Llama, Goat, Donkey, Pig, Ox, Ratsnake, Copperhead, Python, Rattlesnake, Kingsnake, SeaTurtle, Eel, Dolphin, Shark, Whale, Goose
from attractions import PettingZoo, Wetlands, SnakePit, Attraction
from datetime import date
import json


mama = Llama(1, "Mama Llama", "domestic llama","morning", "llama chow")
billy = Goat(2, "Billy", "domestic goat", "midday", "goat chow")
waffles = Donkey(3, "Waffles", "domestic donkey", "afternoon", "donkey chow")
chris = Pig(4,"Chris P Bacon", "domestic pig", "morning", "pig chow")
para = Ox(5, "Para 'D' Ox", "domestic ox", "midday", "ox chow")
# goose = Goose(16, "Goose the Goose", "domestic goose", "goose chow")

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)
Пример #11
0
from animals import Llama, Capybara, Tortoise, Pig, Ermine
from animals import Garden_Snake, Earthworm, Salamander, Python_Snake, Boa_Snake
from animals import Fish, Alligator, Seahorse, Frog, Platypus
from attractions import PettingZoo, SnakePit, Wetlands


#walking🦙
june = Llama("June","Llama", "morning","Macaroons",123456789)
johnny = Capybara("Johnny","Capybara", "midday", "pumpkins", 111111)
raphael = Tortoise("Raphael","Tortoise", "afternoon", "pizza", 222222)
wilbur = Pig("Wilbur","Pig", "morning", "slop", 333333)
ernesto = Ermine("Ernesto","Ermine", "afternoon","popsicles", 444444)

#slithering🐍
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")
from animals import Goose, Alligator, Alpaca, Bird, Donkey, Duck, Fish, Frog, Goat, Lizard, Llama, Pig, Snake, Toad, Tortoise, Turtle
from attractions import PettingZoo, SnakePit, Wetlands

barbara = Llama("Barbara", "Domestic Llama", "morning", "Llama Chow", 12345)

kong = Donkey("Kong", "African Wild Ass", "midday", "Donkey Chow", 12346)

tom_brady = Goat("Tom Brady", "Wild Goat", "afternoon", "Goat Chow", 12347)

fluffy = Alpaca("Fluffy", "Domestic Alpaca", "morning", "Alpaca Chow", 12348)

porky = Pig("Porky", "Pot Belly Pig", "midday", "Pig Chow", 12349)

bertha = Snake("Bertha", "Green Anaconda", "Snake Chow", 23456)

jose = Lizard("Jose", "Mexican Beaded Lizard", "afternoon", "Lizard Chow", 23457)

wayne = Tortoise("Wayne", "Galapagos Tortoise", "morning", "Tortoise Chow", 23458)

michelangelo = Turtle("Michelangelo", "Teenage Mutant Ninja Turtle", "midday", "Turtle Chow", 23459)

chompy = Alligator("Chompy", "American Alligator", "afternoon", "Alligator Chow", 34567)

nemo = Fish("Nemo", "Clown Fish", "Fish Chow", 34568)

miss_blue = Bird("Miss Blue", "Great Blue Turaco", "morning", "Bird Chow", 34569)

frogger = Frog("Frogger", "Green Frog", "midday", "Frog Chow", 45678)

mr_toad = Toad("Mr. Toad", "Common Toad", "afternoon", "Toad Chow", 45679)
Пример #13
0
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()
Пример #14
0
from animals import Penguin
from animals import Goose
from animals import Animal
from attractions import PettingZoo
from attractions import WetLands
from attractions import ReptileHouse
from attractions import Attraction
# from movements import Walking
# from movements import Swimming
# from movements import Slithering

bob = Goose("Bob", "Canada goose", "morning", "watercress sandwiches", 44995)
bob.run()
bob.swim()

miss_fuzz = Llama("Miss Fuzz", "domestic llama", "midday", "llama chow", 55234)
print(miss_fuzz.chip_number)

print(miss_fuzz.name)
print(
    f'{miss_fuzz.name}, the {miss_fuzz.species}, is available to pet during the {miss_fuzz.shift} shift.'
)
miss_fuzz.feed()

fuzz_butt = Goat("Fuzz Butt", "cutest baby goat ever", "morning", "goat food",
                 55012)
print(fuzz_butt)
print(
    f'{fuzz_butt.name}, the {fuzz_butt.species}, is available to pet during the {fuzz_butt.shift} shift.'
)
fuzz_butt.feed()
Пример #15
0
from attractions import PettingZoo, SnakePit, Wetlands

from animals import Copperhead, Diamondback, Donkey, Fish_With_No_Eyes, Goat, Goldfish, Goose, Gorgon, Jellyfish, Llama, Mallard, Orangutan, Rat_Snake, Rattlesnake, Shark, Small_Horse

steve_url = Copperhead("Steve Url", "copperhead", "snake pellets", 1)
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])
Пример #16
0
from .attractions import PettingZoo, Wetlands, SnakePit
from animals import Goose, Python, Crocodile, Salamander, Anaconda, Gecko, StingRay, Goldfish, Catfish, Otter, Shark, Llama, Goat, Horse, Pig, Cow

silk = Python("Silk", "python", "mouse")
jaws = Crocodile("Jaws", "crocodile", "rat")
sammy = Salamander("Sammy", "salamander", "lizard food")
nicki = Anaconda("Nicki", "anaconda", "rat")
geiko = Gecko("Geiko", "gecko", "lizard food")

ray = StingRay("Ray", "stingray", "ray food")
nemo = Goldfish("Nemo", "goldfish", "fish food")
feline = Catfish("Feline", "catfish", "worms")
tubs = Otter("Tubs", "otter", "small fish")
bruce = Shark("Bruce", "Great White Shark", "small fish")

kevin = Llama("Kevin", "domesticated Llama", "morning", "llama food")
gary = Goat("Gary", "billy-goat", "mid-day", "goat food")
chester = Horse("Chester", "stallion", "afternoon", "hay")
oinky = Pig("Oinky", "pot-belly", "morning", "oats")
bessy = Cow("Bessy", "milking cow", "afternoon", "grass")
bob = Goose("Bob", "Canada goose", "watercress sandwiches")
bob.run()
bob.swim()

varmit_village = PettingZoo("Varmit Village")
crocodile_valley = SnakePit("Crocodile Valley")

crocodile_valley.add_animals(jaws)
crocodile_valley.add_animals(sammy)
crocodile_valley.add_animals(nicki)
Пример #17
0
from animals import Lizard, Donkey, Llama, Frog, Goat, Snake, Duck, Fish, Bull, Pigeon, Stork, Rabbit, Snail, Parakeet, Rhino
from attractions import PettingZoo, SnakePit, Wetlands

kenny = Lizard('Kenny', 'lizard', 'manflesh', 69420)
jenny = Donkey('Jenny', 'donkey', 'midnight', 'manflesh', 1337)
penny = Llama('Penny', 'llama', 'dusk', 'manflesh', 808)
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}"
    )