- This event has passed.
5 PM – Python OOP – Gamas
November 12 @ 5:00 pm - 6:00 pm
Today We Did
- We started MonsterInheritance project
Homework
- Create monster.py, create Monster class with the following attributes
- species
- health
- min_damage
- max_damage
- Inside monster.py, create a new method
- get_info(self)
- this will return something like this <species> – <health> health. Attack Min <min_damage>, Max <max_damage>.
- For example, it will return Dragon – 100 health. Attack Min 50, Max 80.
- this will return something like this <species> – <health> health. Attack Min <min_damage>, Max <max_damage>.
- get_info(self)
- Inside monster_system.py
- Add code to do the Add new monster
- Add code to do View All Monsters
-
MAIN MENU: 1. View All Monsters 2. Add New Monster 3. Start Adventure Make your selection (enter 'exit' to quit): 2 ADD MONSTER Enter species: Unicorn Enter health: 70 Enter minimum damage: 40 Enter maximum damage: 70 MAIN MENU: 1. View All Monsters 2. Add New Monster 3. Start Adventure Make your selection (enter 'exit' to quit): 1 VIEW ALL MONSTERS - Dragon - 100 health - 20 minimum damage - 100 maximum damage - Stone Golem - 50 health - 20 minimum damage - 50 maximum damage - Water Golem - 50 health - 20 minimum damage - 50 maximum damage - Minotaur - 80 health - 25 minimum damage - 80 maximum damage - Cylops - 75 health - 15 minimum damage - 90 maximum damage - Unicorn - 70 health - 40 minimum damage - 70 maximum damage