Today We Did
- Reviewed and finished SchoolSystem
Homework
- Modify the code we wrote in class with the following instructions: https://drive.google.com/drive/folders/1Gy-hd4QHOnQKmmT_lL164JMiWypBBbv8
- Create find book by ID
- Create a new attribute: a dictionary named
id_to_book
- In the
add_book()
method, also add the book to the id_to_book
dictionary - Create a method
find_book_by_id
— this is going to look exactly like find_book_by_name
, but with the id_to_book
dictionary instead of book_dictionary
- Create list all old books
- Go through the dictionary values. If the book was written before 2000, print it out. Otherwise, don’t print anything out.
Feel free to let me know if I have any questions — reach me at szhuang@ayclogic.com.