« All Events
6 PM – Python OOP – Shawn
July 28, 2023 @ 5:00 pm - 6:00 pm
Today We Did
- We continued creating the main.py for MonsterInheritance project.
- Added sword attack
- Continued on start game
Homework
- Create file called
Jul28_InheritanceHW.py
and do 9-6 and 9-7 on page 173 in the textbook.
- Continue with MonsterInheritance main.py and finish
sword_attack
:
- Get a random attack value from the Monster between 5 and the monster’s max attack
- Subtract your health (
self.health
) by that value
- Print out a statement describing what just happened (example: “Troll just attacked you with 15 damage. Your remaining health is 59”)