American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6pm- Python OOP-Joshua

April 24 @ 6:00 pm - 7:00 pm

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

  1. the animal’s name/species Ex. Cheetah
  2. how many legs it has Ex. 4
  3. 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)

Details

Date:
April 24
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights