Today We did
- Explained the application loop
- Talked about the theory behind having multiple files
- Why the class variables in __init__ can help us have a “updating” school system that remembers students we add
Homework
- Implement the list_students(self): class (Option 2)
Hints/Steps- In a for loop, you extract each student from the list
- Then with that student object, grab the name, age , and grade and write a f string with that information
- Sample Sentence ” student.name is in student.grade and is student.age years old” (don’t forget to f string it with brackets
- Remember, you need to loop through self.student_list
- Find Student (Option 3)
Hints- Ask Only for the name you want to search (Changed from the explantion
- In a loop similar to the for loop in option 2, check each student’s name with an if statement to see if it is a match to the input
- If it is a match, print that student’s other information
So structure for Find student is
- Ask for student’s name with
- For loop for all the students
- Check if the input isthe same as the student.name of each file
- If found, print the same sample sentences option 2