American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Python OOP – Juan

October 30, 2023 @ 5:00 pm - 6:00 pm

Gamas Sub

Today We Did
  1. We reviewed School System homeworks
    1. We reviewed how to add staff to dictionary
    2. We reviewed how to list all staffs.
    3. We went over how to choose the right dictionary key from staff. Is it staff.name, staff.email or staff.phone. The key of dictionary will be depend on the program.
      1. If the program have feature to find staff using name then, the dictionary key has to be the staff.name.
      2. If the program have feature to find staff using phone then, the dictionary key has to be the staff.phone.
      3. If the program have feature to find staff using name and email then you need to create 2 dictionaries, one with  staff.name key and another with staff.email key.
    4. We reviewed how to list all staffs younger than 20.
Homework
  1. All files that we did in the class can be accessed inside https://drive.google.com/drive/folders/1r_ICEomRtQgux1_ZtUT4OhHX_SXB7uvh?usp=sharing
  2. Inside add_new_student(self) method, make sure to convert “age” from String to Integer.
  3. Add 2 more features in the menu
    1. 19. List all students older than 14 inside dictionary- HW
      20. List all students older than 14 inside list- HW
    2. This features are very similar to list all staffs younger than 20 feature.
  4. After you add these 2 features. Run your program and add these 3 students
    1. ADD NEW STUDENT
      Enter student's name: Gamas
      Enter student's age: 100
      Enter student's grade: 12
      Added student: Gamas, 100, 12
      
      ADD NEW STUDENT
      Enter student's name: Juan
      Enter student's age: 20
      Enter student's grade: 11
      Added student: Juan, 20, 11
      
      ADD NEW STUDENT
      Enter student's name: Ely
      Enter student's age: 12
      Enter student's grade: 7
      Added student: Ely, 12, 7
    2. And then do the 19. List all students older than 14 inside dictionary- HW and you should get
      1. LIST ALL STUDENTS OLDER THAN 14 USING DICTIONARY
        Gamas : age 100, grade 12
        Juan : age 20, grade 11
    3. And then do the 20. List all students older than 14 inside list- HW and you should get
      1. LIST ALL STUDENTS OLDER THAN 14 USING LIST
        Gamas : age 100, grade 12
        Juan : age 20, grade 11

Details

Date:
October 30, 2023
Time:
5:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights