American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

9 AM – Python OOP – Indo – Gamas

January 20 @ 9:00 am - 10:00 am

Today We Did
  1. We continued with Monster Inheritance project.
  2. We added sword and magic attack
  3. We added monster.sword_attack(self, damage)
  4. We added monster_attack_player(self, monster) method.
  5. We added the fire and water magic attack
Homework
  1. Similar to monster.sword_attack(self, damage), create a new method inside monster.py magic_attack(self, damage, magic_type) 
  2. After you created monster.magic_attack() method, you have to call it from main.py where the player attack the monster with magic attack.
  3. copy codes from page 168 to 169. Do it in a file called inheritance_hw_1.py.

Details

Date:
January 20
Time:
9:00 am - 10:00 am
Verified by MonsterInsights