American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Joel

January 8 @ 6:00 am - 7:00 pm

Today we did:
  1. We did a new project called ZooSystem to practice with inheritance and overriding.
Homework:
  1. In the ZooSystem, make a new function called initialize_animals, and inside, make one of each: a Reptile, Bird, and Mammal. Add them all to the dictionary, and then make sure to call this function right before the while True loop in the application_loop.
  2. Make sure to complete the other two selections, which is “Show daily activities” and “Calculate total cost”.
  3. Show daily activities is the showing the get info, what the animal eats, what sound it makes, and its daily care cost for each animal in the dictionary.
  4. Calculate total cost is getting the total cost of how much it costs to take care of all the animals combined. Hint: you should go through each animal, have a cost variable = 0, and then add one by one each animal’s cost to the cost variable to get the total.
  5. If you have any questions, feel free to email me at joel@ayclogic.com.

Details

Date:
January 8
Time:
6:00 am - 7:00 pm