Python code the Book class in book.py. This should be a simple class with the required attributes for a book (title, aut
Posted: Tue May 24, 2022 8:36 am
Python code the Book class in book.py.
This should be a simple class with the required attributes for a
book (title, author,
number of pages, whether or not it is required) and the
methods:
__init__
__str__
two methods to mark the book as required/completed
a method to determine if a book is considered "long", which is
defined as
having 500+ pages.
load books (from csv file into Book objects in the
list)
save books (from book list into csv file)
add book
add a single Book object to the books attribute
get number of required books
sort (by the key passed in, then by priority)
Do not store any additional attributes in this class. (E.g., you
don't need to store the
number of books because this information is easily derived from
what you do store.)
The kivy code for the following picture:
Sort by: Author Add New Book... Title: Author: Pages: Add Book Clear Reading Tracker 2.0 Pages to read: 1017 Developing the Leader Within You by John Maxwell, 225 pages The 360 Degree Leader by John Maxwell, 369 pages (completed) In Search of Lost Time by Marcel Proust, 93 pages (completed) The Practice of Computing Using Python by Punch and Enbody, 792 pages You need to read The Practice of Computing Using Python. Get started!
This should be a simple class with the required attributes for a
book (title, author,
number of pages, whether or not it is required) and the
methods:
__init__
__str__
two methods to mark the book as required/completed
a method to determine if a book is considered "long", which is
defined as
having 500+ pages.
load books (from csv file into Book objects in the
list)
save books (from book list into csv file)
add book
add a single Book object to the books attribute
get number of required books
sort (by the key passed in, then by priority)
Do not store any additional attributes in this class. (E.g., you
don't need to store the
number of books because this information is easily derived from
what you do store.)
The kivy code for the following picture:
Sort by: Author Add New Book... Title: Author: Pages: Add Book Clear Reading Tracker 2.0 Pages to read: 1017 Developing the Leader Within You by John Maxwell, 225 pages The 360 Degree Leader by John Maxwell, 369 pages (completed) In Search of Lost Time by Marcel Proust, 93 pages (completed) The Practice of Computing Using Python by Punch and Enbody, 792 pages You need to read The Practice of Computing Using Python. Get started!