American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

10 AM – Python OOP – Indo – Gamas

December 16, 2023 @ 10:00 am - 11:00 am

Today We Did
  1. We continued with Monster Inheritance project.
    1. We added add monster and list all monster
    2. We started with Start Adventure menu
      1. We display all monsters for user to fight.
      2. We allow user to select a monster.
Homework
  1. No class on Dec 24 and Dec 30. The class will resume on January 6th.
  2. Continue on Monster Inheritance. After user enter the correct monster species to fight, display the attack menu like below and get user input. After that you don’t have to do anything else.
    1. What do you want to do with the cyclops
      1. Magic attack
      2. Sword attack - 10 to 20 damage
      Enter your selection: 2
  3. If you do it properly, it should do like below
  4. 1. Add Monster
    2. List all monsters
    3. Play Adventure
    Enter your selection (Enter 'exit' to quit): 2
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 19 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    - Unicorn - 70 health - 70 Max attack
    
    Please select one of the following
    1. Add Monster
    2. List all monsters
    3. Play Adventure
    Enter your selection (Enter 'exit' to quit): 3
    Enter your name: Gamas
    Enter player's health: 100
    
    Hi Gamas, Welcome to AYC Logic Adventure Game
    
    Gamas you have 100 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 19 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    - Unicorn - 70 health - 70 Max attack
    Enter your selection (enter 'stop' to quit the game): cyclops
    
    What do you want to do with the cyclops
    1. Magic attack
    2. Sword attack - 10 to 20 damage
    Enter your selection: 2
    You attacked Cyclops with 16 damage and the Cyclops has 44 health remaining.
  5. As a bonus point, after user select “2. Sword attack – 10 to 20 damage”, If you add the code that will actually reduce the monster health by random damage between 10 to 20 damage, then I will give you 3% bonus point for your final exam.

Details

Date:
December 16, 2023
Time:
10:00 am - 11:00 am
Verified by MonsterInsights