- This event has passed.
6 PM – Python OOP – William
June 11 @ 6:00 pm - 7:00 pm
Today We:
- Reviewed homework/OOP Concepts
- Started SchoolSystem
- Created Student class for add_student()
- Created list and dictionary to store students
Homework:
Continue working on SchoolSystem:
- Add the following options to the menu:
- 2. List all students (list)
- 3. List all students (dictionary)
- (See example output for the output of these methods)
- Create option 4: Add new teacher, similar to Add student
- Create a new file teacher.py; each teacher has the following attributes:
- name
- age
- subject_of_expertise
- Create a new teacher with attributes based on user input
- Store teachers in both a list and dictionary
- Create a new file teacher.py; each teacher has the following attributes:
Example output:
Please select one of the following 1. Add student 2. List all students (list) 4. Add teacher 8. List all students (dictionary) Enter your selection (Enter "exit" to quit): 1 ADD NEW STUDENT Enter student's name: Joe M. Enter student's age: 21 Enter student's grade: 9 You have added a new student Joe M. in our system. Please select one of the following 1. Add student 2. List all students (list) 4. Add teacher 8. List all students (dictionary) Enter your selection (Enter "exit" to quit): 2 LIST ALL STUDENTS (LIST) Joe M. - 21 years old - Grade 9 Please select one of the following 1. Add student 2. List all students (list) 4. Add teacher 8. List all students (dictionary) Enter your selection (Enter "exit" to quit): 8 LIST ALL STUDENTS (DICTIONARY) Joe M. - 21 years old - Grade 9 Please select one of the following 1. Add student 2. List all students (list) 4. Add teacher 8. List all students (dictionary) Enter your selection (Enter "exit" to quit): 4 ADD NEW TEACHER Enter teacher's name: William Enter teacher's age: 19 Enter teacher's subject of expertise: Python OOP William was successfully added to the system!
If you have any questions, please email me at williamsmith@ayclogic.com.