Loading Events

« All Events

  • This event has passed.

5 PM – Python OOP – Gamas

November 12 @ 5:00 pm - 6:00 pm
Today We Did
  1. We started MonsterInheritance project
Homework
  1. Create monster.py, create Monster class with the following attributes
    1. species
    2. health
    3. min_damage
    4. max_damage
  2. Inside monster.py, create a new method
    1. get_info(self)
      1. this will return something like this <species> – <health> health. Attack Min <min_damage>, Max <max_damage>.
        1. For example, it will return Dragon – 100 health. Attack Min 50, Max 80.
  3. Inside monster_system.py
    1. Add code to do the Add new monster
    2. Add code to do View All Monsters
    3. 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

Details

  • Date: November 12
  • Time:
    5:00 pm - 6:00 pm