Today We Did
- reviewed the monster homework
- talked about dictionary basics
HOMEWORK
So From my explanation, it’d be great if you could recreate it by yourself.
However, I want to introduce a “homework only” system: The snack system.
The snack system is a simple system like school or student which stores information. This homework is shorter than my original homework
For now, all I want is a few things
- Create a New project called SnackSystem and create two files :snack.py and main.py
- For snack, the only thing inside should be a Snack class with the following class variables
- snack_name
- snack_type
- size
- is_healthy
- for the main, i only want three things
- create a SnackSystem class
- in the init, put an empty dictionary and your menu
- create an application loop function (def_application loop) You only need to make exit if statement work. Else, you just write (pass) instead of any code
LOOK AT THIS EXAMPLE OF THE MENU
Please select one of the following
1. Add Snack
2. list all snacks
3. find snack
4. list salty snacks
5. list sweet snacks
Enter your selection (Enter “exit” to quit):