American Young Coder (AYC)

Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Shawn

January 2 @ 6:00 pm - 7:00 pm

Today We Did
  1. We continued with Monster Inheritance project.
  2. We utilized dictionary to translate from “1” to “fire”, “2” to “water” etc. And we utilized another dictionary to translate from “1” to 15 (fire magic damage), “2” to 15 (water magic damage) etc.
  3. We added code to make the magic attack to work.
Homework
  1. If you were not able to copy the codes completely, the Monster Inheritance codes can be found in https://drive.google.com/drive/u/0/folders/1zuuNL_dnmRkxMaInRAyDHwwyWPLXiYEr
  2. Inside main.py, the play_adventure method is too big now, almost 50 lines of codes. We need to break down this big method into smaller methods.
    1. You need to move sword attack related codes from play_adventure method into its own sword_attack method.
    2. And you need to move magic_attack related codes from play_adventure method into its own magic_attack method.
  3. Upload your codes into google drive.
  4. Next week we are going to learn how to do monster special behavior using inheritance.

Details

Date:
January 2
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights