- This event has passed.
7 PM – Python OOP – Joel
June 10 @ 7:00 pm - 8:00 pm
Today we did:
- We went over the homework and finished the GrocerySystemV4 using classes for the GroceryItem and the main class.
Homework:
- 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).
- 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:
- Please select one of the following
1. Add Monster
2. List all monsters
3. Play Adventure
Enter your selection (Enter ‘exit’ to quit): “”” - Complete the code for the first two selections: Add Monster and List all Monsters.
- When you add the monster to the dictionary, the name will the be key and the value will be the Monster.
- If you have any questions, feel free to email me at joel@ayclogic.com.