American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python OOP – Gamas

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

Today We Did
  1. We continued with Monster Inheritance project.
  2. We added code so it can start the adventure by displaying all monsters.
Homework
  1. Continue with Monster Inheritance.
  2. After 2nd menu, add codes to check if monster exists in the dictionary, it is not, then print Invalid selection, ‘asdfadsf’ is not in our system. Please try again. This is very similar to LibrarySystem.findBook feature.
  3. If the monster exists, display the attack menu.
  4. If you did it properly, below is the expected behavior
  5. Gamas you have 100 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game): asdfadsf
    Invalid selection, 'asdfadsf' is not in our system. Please try again
    
    Gamas you have 100 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game): dragon
    
    What do you want to do with the dragon
    1. Magic attack
    2. Sword attack - 10 to 20 damage
    Enter your selection: 2
    You attacked dragon with 14 damage and the dragon has 86 health remaining.
    dragon attacked you with 47 damage. Your remaining health is 53.
    
    Gamas you have 53 health remaining.
    Please choose your monster:
    - Dragon - 86 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game):
    

     

Details

Date:
November 27, 2023
Time:
7:00 pm - 8:00 pm
Verified by MonsterInsights