Loading Events

« All Events

  • This event has passed.

5:30 PM – Python OOP – Gamas

October 5 @ 5:30 pm - 6:30 pm
Today We Did
  1. We continued with dragon class inheriting from Monster class.
  2. We added special behavior when dragon is attacked by fire magic
Homework
  1. Inside dragon.py, add code so when dragon is attacked by “water” magic, it will do double damage.
    1. “Dragon is weak against water magic. Therefore, the damage is doubled to 20 damage.”
  2. Inside water_golem.py, add code so when water golem is attacked by “earth” magic, it will do half damage.
    1. “Water Golem is resistance against earth magi.”Therefore,. the damage is halved to 5 damage.”
  3. Create a new file stone_golem.py
    1. Create a new class StoneGolem inherits Monster.
    2. Inside this new class, add a special behavior when StoneGolem is attacked by certain type of magic (up to you).

Details

  • Date: October 5
  • Time:
    5:30 pm - 6:30 pm