- This event has passed.
5 PM – Python OOP – Bill Han
July 12, 2022 @ 5:00 pm - 6:00 pm
Gamas Chang substitute Bill.
Today We Do
- We reviewed homeworks.
- We added find book by id.
- We added a new dictionary, books_by_name, to store books whose key is its title/name.
- We added find book by title/name.
Homework
- Make find book by title/name case insensitive. To do this, you have to make sure to lowercase the books_by_name key when adding new book. AND you also need to make sure to lowercase user entered book title/name when checking if a book exists in the dictionary. AND when retrieving a book from dictionary.
- Add “6. List all books before year 2010” feature. To do this, you have to use for loop to go through each element inside the list similar to “3. List all books”. But inside the for loop you need to use if statement to check if book.year is less than 2010.
- All the BookSystem python files have been uploaded into google drive.