American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

4:30pm – Python OOP – Roland

May 9 @ 4:30 pm - 5:30 pm

Today We Did

  1. Homework
    1. 9-6 –> BagelStore (not IceCreamStore)
    2. 9-7 –> Administrator
  2. MonsterInheritance
    1. Monster class
      1. get_info
      2. receive_sword_attack
      3. receive_magic_attack

Homework

Continue working on the MonsterInheritance project, implement the Dragon class following the instructions below:

  1. Dragon should inherit from Monster
  2. __init__
    1. Should take in 2 attributes: health, max_attack
    2. Call super() with “dragon” as the species type, and the two attributes passed in
  3. Override receive_magic_attack
    1. If the magic_type is “fire” then print “Dragon is immune to fire. Therefore, the dragon suffer no damage” and DO NOTHING ELSE
    2. If the magic_type is anything ELSE, then user super() to call receive_magic_attack from the parent with the damage and magic_type passed in
      1. hint: super().receive_magic_attack…

If you have any questions, feel free to email me at rolandyang@ayclogic.com

Details

Date:
May 9
Time:
4:30 pm - 5:30 pm
Verified by MonsterInsights