American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Python OOP – Joel

June 10 @ 7:00 pm - 8:00 pm

Today we did:
  1. We went over the homework and finished the GrocerySystemV4 using classes for the GroceryItem and the main class.

 

Homework:
  1. Create a new file called monster.py and make a Monster class inside of it. Make the constructor, and make the following attributes: species (String), health (int), max_attack (int).
  2. Make a new file called monster_system.py and make a class called MonsterSystem. Make a monster_dictionary dictionary in the constructor, and also the menu like this:
  3. Please select one of the following
    1. Add Monster
    2. List all monsters
    3. Play Adventure
    Enter your selection (Enter ‘exit’ to quit): “””
  4. Complete the code for the first two selections: Add Monster and List all Monsters.
  5. When you add the monster to the dictionary, the name will the be key and the value will be the Monster.
  6. If you have any questions, feel free to email me at joel@ayclogic.com.

Details

Date:
June 10
Time:
7:00 pm - 8:00 pm