Exemplo n.º 1
0
def main():
    mcdonald = Farm("McDonald")
    mcdonald.add_animal('cows', 5)
    mcdonald.add_animal('sheep')
    mcdonald.add_animal('sheep')
    mcdonald.add_animal('goats', 12)

    print(mcdonald.get_info())
Exemplo n.º 2
0
def main():
    macdonald = Farm("MacDonald's")
    macdonald.add_animal('cow', 5)
    macdonald.add_animal('sheep')
    macdonald.add_animal('sheep')
    macdonald.add_animal('goat', 12)

    macdonald.get_info()
Exemplo n.º 3
0
def main():
    from farm import Farm
    mcDonald = Farm("McDonald")
    mcDonald.add_animal("cow", 5)
    mcDonald.add_animal("sheep")
    mcDonald.add_animal("sheep")
    mcDonald.add_animal("goat", 12)

    mcDonald.get_info()
    print(mcDonald.get_animal_types())
    mcDonald.get_short_info()
Exemplo n.º 4
0
from farm import Farm

macdonald = Farm("McDonald")
macdonald.add_animal('cow', 5)
macdonald.add_animal('sheep')
macdonald.add_animal('sheep')
macdonald.add_animal('goat', 12)

print(macdonald.get_info())