American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Shawn

December 19, 2023 @ 6:00 pm - 7:00 pm

Today We:
  1. Continued the Monster Inheritence system project
Your HW:
  1. Add the magic attack options using a dictionary
    1. create 2 new dictionaries as atributes, magic_types and magic_damages
    2. Make their keys be “1”, “2” . . . “4” like the numbers in the magic menu (we’re doing the same thing as the grocery system menu)
    3. Make the magic_types values be the corresponding magic element from the menu ex: “fire”, “water”, “earth”, “air”
    4. Make the magic_damages values be the corresponding damage each magic attack does, ex: 15,15,15,18
  2. Ask the user what type of magic damage they want using the magic_menu
  3. Use the 2 dictionaries you created to get the magic type and damage
  4. Then call the recieve_magic_attack on the selected monster and feed it the correct parameters based on the user input
  5. Also make sure to calculate the damage the user takes after attacking the monster
  6. No class next week, resumes 1/2/24

Details

Date:
December 19, 2023
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights