American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Bill

November 19, 2022 @ 6:00 pm - 7:00 pm

Today We:
  1. Continued working on the monster inheritence project
  2. Made a new attack menu for the selected_monster
  3. Added the Sword Attack functionality
Your HW:
  1. Inside the monster class, create a new method called receive_magic_attack with 2 parameters:
    • Damage
    • Magic_Type
  2. Inside the main, create a new attribute called magic_attack_menu
    1. What kind of magic attack you want to do:
      1. Fire magic - Max damage: 10
      2. Water magic - Max damage: 10
      3. Earth magic - Max damage: 15
      4. Wind magic - Max damage: 8 
      Enter your selection:
  3. If the user enters “1” when asked which attack they want to deal, ask the user what magic attack they want to do with the new magic_attack_menu
  4. Then deal a random ammount of damage from 1 to the respective max damage of each magic attack to the monster using the receive_magic_attack method

Reminder:
No class next week, Happy Thanksgiving!
Classes resume after Nov. 27

Details

Date:
November 19, 2022
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights