American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

Thursday- 7:00PM – Python OOP- Joshua

August 28 @ 6:00 pm - 7:00 pm

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

  1. Create a New project called SnackSystem and create two files :snack.py and main.py
  2. For snack, the only thing inside should be a Snack class with the following class variables
    1. snack_name
    2. snack_type
    3. size
    4. is_healthy
  3. for the main, i only want three things
    1. create a SnackSystem class
    2. in the init, put an empty dictionary and your menu
    3. 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):

Details

Date:
August 28
Time:
6:00 pm - 7:00 pm