- This event has passed.
6 PM – Python OOP – Darin (William Sub)
June 25 @ 6:00 pm - 7:00 pm
Next week is a holiday, we will meet again on July 9.
What We Did Today:
- Finished School System by implementing the find methods.
- Started on LibrarySystem, which is similar to School System
Homework:
Continue working on LibrarySystem, and do the following:
- Remove the main character attribute for the book class, its easier to do without it.
- Add the following options to the menu:
- 1. Add book (the year should be an integer)
- 2. List all books
- 3. Find book by name (using the dictionary, in the same way we did with SchoolSystem)
Example output:
Please look at below options
1. Add book
2. List all books
3. Find book by name
4. Find book by id
5. List all old books
Enter your selection. Enter ‘quit’ to exit: 1
ADD BOOK
Enter book title: Harry Potter
Enter book author: JK Rowling
Enter book publish year: 1999
Enter book id: 123
Please look at below options
1. Add book
2. List all books
3. Find book by name
4. Find book by id
5. List all old books
Enter your selection. Enter ‘quit’ to exit: 1
ADD BOOK
Enter book title: my book
Enter book author: me
Enter book publish year: 2024
Enter book id: 1234
Please look at below options
1. Add book
2. List all books
3. Find book by name
4. Find book by id
5. List all old books
Enter your selection. Enter ‘quit’ to exit: 2
LIST ALL BOOKS
Harry Potter – JK Rowling – 1999 – 123
my book – me – 2024 – 1234
Please look at below options
1. Add book
2. List all books
3. Find book by name
4. Find book by id
5. List all old books
Enter your selection. Enter ‘quit’ to exit: 3
FIND A BOOK
Enter the title of the book to find: uhh
No book with the title uhh exists.
Please look at below options
1. Add book
2. List all books
3. Find book by name
4. Find book by id
5. List all old books
Enter your selection. Enter ‘quit’ to exit: 3
FIND A BOOK
Enter the title of the book to find: Harry Potter
Harry Potter – JK Rowling – 1999 – 123
Notes:
If you have any questions, you can email me at ddjapri@ayclogic.com !!