hi'
i need to built a class for zoo
and i need some help
that is the code so far
==================
id have to Write a main function called main that performs the following tasks:
Creates one animal of each type (Unicorn, Skunk, Cat, Dog, and Dragon) and initializes it with the values listed in the table. She keeps the shows of the animals in the list called zoo_lst.
Goes through the animals in the zoo_lst list using the for loop. For each hungry animal, prints its type (type, subdivision name) and its name (name_) and then feeds it until it is no longer hungry (that is, until its degree of hunger is 0).
Instructions: You can use the following code skeleton.
any help how to start ?
and where to put the main def ?
i need to built a class for zoo
and i need some help
that is the code so far
==================
class Animal: def __init__(self,_name,_hunger ): self._name =_name self._hunger= 0 class Dog(): def __init__(self,_name,_hunger ): pass class cat(): def __init__(self,_name,_hunger ): pass class Skunk(): def __init__(self,_name,_hunger ): pass class Unicorn(): def __init__(self,_name,_hunger ): pass class Dragon(): def __init__(self,_name,_hunger ): pass def main(): for animal in zoo_lst: while animal.is_hungry(): animal.feed()======================
id have to Write a main function called main that performs the following tasks:
Creates one animal of each type (Unicorn, Skunk, Cat, Dog, and Dragon) and initializes it with the values listed in the table. She keeps the shows of the animals in the list called zoo_lst.
Goes through the animals in the zoo_lst list using the for loop. For each hungry animal, prints its type (type, subdivision name) and its name (name_) and then feeds it until it is no longer hungry (that is, until its degree of hunger is 0).
Instructions: You can use the following code skeleton.
any help how to start ?
and where to put the main def ?