- This event has passed.
5 PM – Python OOP – Juan
October 30, 2023 @ 5:00 pm - 6:00 pm
Gamas Sub
Today We Did
- We reviewed School System homeworks
- We reviewed how to add staff to dictionary
- We reviewed how to list all staffs.
- 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.
- If the program have feature to find staff using name then, the dictionary key has to be the staff.name.
- If the program have feature to find staff using phone then, the dictionary key has to be the staff.phone.
- 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.
- We reviewed how to list all staffs younger than 20.
Homework
- All files that we did in the class can be accessed inside https://drive.google.com/drive/folders/1r_ICEomRtQgux1_ZtUT4OhHX_SXB7uvh?usp=sharing
- Inside add_new_student(self) method, make sure to convert “age” from String to Integer.
- Add 2 more features in the menu
19. List all students older than 14 inside dictionary- HW 20. List all students older than 14 inside list- HW
- This features are very similar to list all staffs younger than 20 feature.
- After you add these 2 features. Run your program and add these 3 students
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
- And then do the 19. List all students older than 14 inside dictionary- HW and you should get
LIST ALL STUDENTS OLDER THAN 14 USING DICTIONARY Gamas : age 100, grade 12 Juan : age 20, grade 11
- And then do the 20. List all students older than 14 inside list- HW and you should get
LIST ALL STUDENTS OLDER THAN 14 USING LIST Gamas : age 100, grade 12 Juan : age 20, grade 11