American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python OOP – Sebastian

February 28 @ 7:00 pm - 8:00 pm

Today We Did

  1. Began Monster Inheritance project
  2. Created basic MonsterSystem class
  3. AYC Logic’s observed holidays: https://www.ayclogic.com/observed-holidays/
  4. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Please come to class with the following written down, ready to explain to me (you don’t have to submit this anywhere, but please have it ready before class)
    1. How do you add to a dictionary? For example, if I have the following code, how would I map the key “cat” to the value “Momo”?
      pet_to_name = {"dog": "Spike"}
    2. How do I make an instance of a class (an object)? For example, if I had the following code, how could I make an instance of the Animal class?
      class Animal:
          
          def __init__(self, name):
              self.name = name
              
          def get_info(self):
              return self.name
    3. How do I call an object’s method? After you made an instance of the Animal class (above), show me how we can call the get_info() method, and print its return value.

Details

Date:
February 28
Time:
7:00 pm - 8:00 pm
Event Categories:
,
Verified by MonsterInsights