- This event has passed.
4:30pm – Python OOP – Roland
May 9 @ 4:30 pm - 5:30 pm
Today We Did
- Homework
- 9-6 –> BagelStore (not IceCreamStore)
- 9-7 –> Administrator
- MonsterInheritance
- Monster class
- get_info
- receive_sword_attack
- receive_magic_attack
- Monster class
Homework
Continue working on the MonsterInheritance project, implement the Dragon class following the instructions below:
- Dragon should inherit from Monster
- __init__
- Should take in 2 attributes: health, max_attack
- Call super() with “dragon” as the species type, and the two attributes passed in
- Override receive_magic_attack
- If the magic_type is “fire” then print “Dragon is immune to fire. Therefore, the dragon suffer no damage” and DO NOTHING ELSE
- 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
- hint: super().receive_magic_attack…
If you have any questions, feel free to email me at rolandyang@ayclogic.com