American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6:30 PM – Python Object Oriented Programming – Sebastian

April 25, 2023 @ 6:30 pm - 7:30 pm

Today We Did
  1. Reviewed OOP, dictionaries, and inheritance
  2. Began creating Monster inheritance program
  3. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Name your homework APR25_inheritance_hw, please submit by next Monday.
  2. Homework: Finish the WaterGolem & Dragon classes:

    Dragon: Create receive_magic_attack method taking damage & magic_type parameters. If the magic_type is “fire”, then print “Dragon is immune to fire attack. Therefore, the dragon suffer no damage”. Otherwise, call the receive_magic_attack method from the Monster parent class.

    WaterGolem: Create the receive_magic_attack method taking damage & magic_type parameters.

    If the magic type is fire, print “Water Golem is immune to fire attack. Therefore, the Water Golem suffer no damage”.

    If the magic type is water, print “Water Golem is resistance to water attack. Therefore, your attack is halved.”, and subtract half of the damage parameter from the watergolem’s health.

    Otherwise, call the parent’s “receive_magic_attack” method and pass in the damage & magic_type parameters. 

Details

Date:
April 25, 2023
Time:
6:30 pm - 7:30 pm
Event Categories:
,
Verified by MonsterInsights