Today We Did
- Reviewed homework on how to use dictionary to reduce duplicate code with the robux example
- Learned OOP (Object Oriented Programming)
- Learned about creating Objects and Classes
- Learned about class attributes and using self.
- Learned about creating class methods
- Used those class methods and class template to make a class
Homework
Part 1
in a file animal_class.py, create an animal class
an animal class should store
- the animal’s name/species Ex. Cheetah
- how many legs it has Ex. 4
- fur type # Fluffy Fur
you should then create three different animals (animal1, animal2, animal3)
animal 1 should be a cheetah
animal 2 should be a dolphin
animal 3 should be a hedgehog
Part 2
Page 158 to 161, create the dog class described ( if given, copy it down)