American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python OOP – Gamas

November 13, 2023 @ 7:00 pm - 8:00 pm

Today We Did
  1. We continued on Library System.
  2. We added Book.get_info() method.
  3. We did find book by name.
Homework
  1. Create a new pycharm project MonsterInheritance
  2. In this new project,
    1. create a new file monster.py and a class Monster with 3 attributes: species, health, max_damage.
    2. create a new file main.py that will run and start the program. Similar to school system.
  3. Inside main.py, create a new dictionary self.monster_dictionary
  4. Immediately add 3 monsters to the dictionary:
    1. Dragon – health 100, max damage 100
    2. Troll – health 50, max damage 75
    3. Water Golem – 50 health, max damage 50.
  5. The program should behave like the following. Just do feature 1 and 2.
  6. Welcome to AYC Logic adventure game
    1. Add new monster
    2. List all monsters
    3. Start adventure
    Please make your selection. Enter "quit" to exit: 2
    
    LIST ALL MONSTERS 
    - Dragon has 100 health and can do 100 damage
    - Troll - 50 health - 75 max damage
    - Water Golem - 50 health - 50 max damage
    
    Welcome to AYC Logic adventure game
    1. Add new monster
    2. List all monsters
    3. Start adventure
    Please make your selection. Enter "quit" to exit: 1
    
    ADD NEW MONSTER
    Enter monster species: Griffin
    Enter monster health: 50
    Enter monster max damage: 50
    You have successfully added Griffin into our system.
    
    Welcome to AYC Logic adventure game
    1. Add new monster
    2. List all monsters
    3. Start adventure
    Please make your selection. Enter "quit" to exit: 2
    
    LIST ALL MONSTERS 
    - Dragon has 100 health and can do 100 damage
    - Troll - 50 health - 75 max damage
    - Water Golem - 50 health - 50 max damage
    - Griffin - 50 health - 50 max damage
    
    Welcome to AYC Logic adventure game
    1. Add new monster
    2. List all monsters
    3. Start adventure
    Please make your selection. Enter "quit" to exit:

Details

Date:
November 13, 2023
Time:
7:00 pm - 8:00 pm
Event Categories:
,
Verified by MonsterInsights