+ 2
Okay, I wanna write a program in Python, a program like a book list, book's name and reading time, how can ı do that?
5 odpowiedzi
+ 8
You can take some inspiration from the codes below.
Classes:
https://code.sololearn.com/cC16ERBzBG20/?ref=app
SQLite:
https://code.sololearn.com/csyhsIovmZJ3/?ref=app
https://code.sololearn.com/c9mosXavqJ9W/?ref=app
Pickle:
https://code.sololearn.com/cNXRdhIOg17U/?ref=app
+ 8
Many ways to do that but I recommend thinking of a class Book and instantiating the objects with parameters like Title, Author, Time, Genre, etc.
Then it would be good to store it as a database. Sqlite is a very nice way to do that, if you want to easily export its contents to some other SQL-based environment.
Or you might try dumping it with the pickle module and store it in a file for later use. This way is the most convenient if you plan only to work on this file with Python and not elsewhere.
+ 2
I was trying with input, but didn't work
+ 1
Okay, I learning Exceptions and Files now, should I wait?
0
Thank you so much