Lab

In this lab we will build off of our pet class. To create a Pet class that will keep track of the type of animal, color, food, noise and name of a given animal. We will utilize classes.

  1. Create a class called Pet. That will have the following attributes:
    • type (i.e. dog, cat, fish)
    • color (i.e. spotted, black, tabby, white)
    • food (i.e. kibbles, tuna, fish flakes)
    • noise (i.e. meow, woof, bark)
    • name (i.e. Sparky, Scooby Doo)
  2. Make sure to use the __init__ method to create these attributes
  3. Create a list of pets
  4. Create a function that takes in a list of pets and prints out the name and the food attributes
  5. Test your function with your list of pets