Пример #1
0
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)
slither_inn.add(cuddles)
slither_inn.add(kissy)
slither_inn.add(monty)
slither_inn.add(cotton)
slither_inn.add(rainbow)
critter_cove.add(tangerine)
critter_cove.add(waddle)
critter_cove.add(ki)
critter_cove.add(ribbit)
critter_cove.add(the_devil)

varmint_village.printReport()
slither_inn.printReport()
critter_cove.printReport()

miss_fuzz.chip_num = 6789
Пример #2
0
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)

# Naming animals and adding them to SnakePit
monty = Python("Monty", "snek", "snake chow", 76)
slitherin = Copperhead("Slitherin", "copperhead", "snake chow", 77)
venom = RattleSnake("Venom", "rattlesnake", "snake chow", 78)
mouf = Cottonmouth("Mouf", "cottonmouth", "snake chow", 79)
nemo = CoralSnake("Nemo", "coralsnake", "snake chow", 80)
the_slither_inn.add(monty)
the_slither_inn.add(slitherin)
the_slither_inn.add(venom)
the_slither_inn.add(mouf)
the_slither_inn.add(nemo)

# Print statements
print(f'{billy.name} the {billy.species} is available to pet during the {billy.shift} shift.')
print(monty.feed())
print(mouf)
print(critter_cove)
print(the_slither_inn)
# varmint_village.animals.remove(mizz_fuzz)
print(varmint_village)
print('The newest animal is', critter_cove.last_critter_added)
varmint_village.add(big_mouth)
Пример #3
0
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)