示例#1
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)
示例#2
0
# 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()

bugs = Bunny("Bugs", "wraskly rabbit", "afternoon", "carrots", 55901)
print(bugs)
print(
    f'{bugs.name}, the {bugs.species}, is available to pet during the {bugs.shift} shift.'
)
bugs.feed()
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)