def release_animal(arboretum):
    animal = None

    print("\nplease enter the animal you want to release\n")
    print("1. River Dolphin")
    print("2. Opeapea")
    print("3. Peuo")
    print("4. Gold Dust Day Gecko")
    print("5. Ulae")
    print("6. Nene Goose")
    print("7. Kikakapu")
    print("8. Hawaiian Happy Face Spider")
    print("9. back")

    choice1 = input("Choose animal to release > ")

    if choice1 == "1":
        animal = RiverDolphin()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "2":
        animal = Opeapea()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "3":
        animal = Pueo()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "4":
        animal = Gecko()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "5":
        animal = Ulae()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "6":
        animal = Goose()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "7":
        animal = Kikakapu()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "8":
        animal = Spider()
        release_into_enviroment(animal, arboretum)

    elif choice1 == "9":
        pass

    else:
        print("\nplease enter number listed\n\n")
        release_animal(arboretum)
def release_animal(arboretum):
    animal = None

    print("1. Gold Dust Day Gecko")
    print("2. River Dolphin")
    print("3. Nene Goose")
    print("4. Kikakapu")
    print("5. Pueo")
    print("6. 'Ulae")
    print("7. Ope'ape'a")
    print("8. Hawaiian Happy-Face Spider")

    choice = input("Choose animal to release > ")

    if choice == "1":
        animal = Gecko()

    if choice == "2":
        animal = RiverDolphin()

    if choice == "3":
        animal = Goose()

    if choice == "4":
        animal = Kikakapu()

    if choice == "5":
        animal = Pueo()

    if choice == "6":
        animal = Ulae()

    if choice == "7":
        animal = Opeapea()

    if choice == "8":
        animal = Spider()

# create animal instance
#iterate over every habitat list in keahua
# put habitats in mega list called all_habitats
# also have a set called all_habitats_set that you can loop through to figure out type of habitat animal can go into

    print(arboretum.rivers)
    for index, river in enumerate(arboretum.rivers):
        print(f'{index + 1}. River {river.id}')

    print("Release the animal into which biome?")
    choice = input("> ")
    # check to see which biomes animal can be added to
    # display appropriate biomes

    arboretum.rivers[int(choice) - 1].animals.append(animal)
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)

print(crocodile_valley.last_critter_added)
Exemplo n.º 4
0
from animals import Clownfish
from animals import Blowfish
from animals import Beluga
from animals import Turtle
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)
Exemplo n.º 5
0
        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])
for animal in varmint_village.animals:
    print(f'You can find {animal.name} the {animal.species} in {varmint_village.attraction_name}.')


slither_inn = SnakePit("Slither Inn")
slither_inn.animals.extend([Toby, Bitey, Karen, Kaa, Dipper])
for animal in slither_inn.animals:
    print(f'You can find {animal.name} the {animal.species} in {slither_inn.attraction_name}.')


danger_bay = WetLands("Danger Bay")
danger_bay.animals.extend([Wally, Cuddles, JabberJaws, Pickles, Mechazilla])
for animal in danger_bay.animals:
    print(f'You can find {animal.name} the {animal.species} in {danger_bay.attraction_name}.')

report_animals_by_attractions(danger_bay, slither_inn, varmint_village)

print(Bartholomew.chip_number)
print(danger_bay.last_critter_added)

bob = Goose("Bob", "Hate filled devil spawn goose", "car batteries", 16)
bob.run()
bob.swim()

Exemplo n.º 6
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)
Exemplo n.º 7
0
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)
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)
Exemplo n.º 8
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])
from animals import Goose
from attractions import PettingZoo

# Create a Goose
bob = Goose("Bob", "Canada goose", "watercress sandwiches")

# 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)
def release_animal(arboretum):
    os.system('cls' if os.name == 'nt' else 'clear')
    animal = None

    print("1. Gold Dust Day Gecko")
    print("2. River Dolphin")
    print("3. Nene Goose")
    print("4. Kikakapu")
    print("5. Pueo")
    print("6. Ulae")
    print("7. Ope'ape'a")
    print("8. Happy-Face Spider")

    choice = input("Choose animal to release : ")

    if choice == "1":
        animal = Gecko(12)

    if choice == "2":
        animal = RiverDolphin(12)

    if choice == "3":
        animal = Goose(12)

    if choice == "4":
        animal = Kikakapu(12)

    if choice == "5":
        animal = Pueo(12)

    if choice == "6":
        animal = Ulae(12)

    if choice == "7":
        animal = Opeapea(12)

    if choice == "8":
        animal = Spider(12)

    habitat_list = []

    try:
        if animal.fresh:
            habitat_list.extend(arboretum.rivers)
    except AttributeError:
        pass

    try:
        if animal.stagnant:
            habitat_list.extend(arboretum.swamps)
    except AttributeError:
        pass

    try:
        if animal.salty:
            habitat_list.extend(arboretum.coastlines)
    except AttributeError:
        pass

    try:
        if animal.mountain_bound:
            habitat_list.extend(arboretum.mountains)
    except AttributeError:
        pass

    try:
        if animal.grassland_bound:
            habitat_list.extend(arboretum.grasslands)
    except AttributeError:
        pass

    try:
        if animal.forest_bound:
            habitat_list.extend(arboretum.forests)
    except AttributeError:
        pass

    if len(habitat_list) > 0:
        for index, habitats in enumerate(habitat_list):
            species_count = list()
            species_list = list()
            for species in habitats.animals:
                species_list.append(species.species)
            for animals in set(species_list):
                species_count.append(
                    f"{str(species_list.count(animals))} {animals}")
            print(
                f'{index + 1}. {habitats.type} ({", ".join(species_count) if len(habitats.animals) > 0 else "No animals here"})'
            )
        print("Release the animal into which habitat?")
    else:
        print("There's no habitat for this animal!")

    choice = input("> ")

    if len(habitat_list[int(choice) -
                        1].animals) < habitat_list[int(choice) -
                                                   1].max_animals:
        habitat_list[int(choice) - 1].animals.append(animal)
    else:
        print(
            "**** That Habitat is not large enough **** \n **** Please choose another one ****"
        )
        for index, habitats in enumerate(habitat_list):
            print(
                f'{index + 1}. {habitats.type} ({len(habitats.animals)} animals)'
            )

            print("Release the animal into which Habitat?")
            choice = input(": ")