Skip to content

srpslmslh/Python_Modul_Week_4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python_Modul_Week_4

Library Project

  • In this project, we want you to write a library program using the Python information you have learned so far, error catching - file operations, especially the Json module and file information.
  • In a library; There are two main parts: Membership transactions and Book transactions.
  • Membership transactions include information on adding a member, deleting a member, checking a member, giving a book to a member, and receiving a returned book from a member. A database or file where membership data is recorded is also required.
  • We can say similar things about book transactions.

To detail the project:

  • It will consist of main.py, Kitap_transactions.py, Member_Transactions.py, Zaman.py files.
Main.py:
  • The main file of our project will be the main.py file. Operations will be executed from this file, other Python files will be called from this section as a module. For example, adding a book, deleting a book, adding a member, giving a book to a member, and member control will be done here.

image

  • Below you will see a run output of this project. You can run the functions in the book_transactions and membership_transactions modules via inputs on the main page.

image

book_transactions.py :
  • In this module, you will write book information (registered books and total number), add, delete, search and update functions. We will save our data in the book.json file. The Kitap.json file will be given to you (you can create it yourself if you wish). File control must be done with the Os Module. Below you can find function examples for book transactions, but you do not have to follow them, you can make your own planning.

image

  • There is a lot of data in the Kitap.json file. We will work with the following data. We will use these as basis when adding new data or searching.

image

Book.json :

sample output is as follows

image

Membership_transactions.py:
  • Here, operations such as member information (member names and total number of members), member updating, adding members, searching for members, deleting members, lending books and returning books will be performed. Additionally, members must be saved in the uye.Json file. When lending a book, it is absolutely
    • The date and time the book was lent and the date to return it after 2 weeks should be added and this information should be saved in the taksi.json file.

image

  • We will do this from the py module when we create it ourselves.
    • After being saved in the taksi.json file, the loaned book should be deleted from Kitap.json so that it does not appear when someone else wants to buy it.
Note: You will create the user.json and tracking.json file yourself.

image

  • The data you will save to Uye.json should be as follows:

image

time.py :
  • We lend our books to our members for 2 weeks. Therefore, we will record the time and date of the loan and the date when it should be returned, thanks to this module. When we run this module, we want it to return the current time and the time 2 weeks later.

image

The data you will save in tracking.json should be as follows:

image

Hackerrank Questions

  1. Diagonal Difference: https://www.hackerrank.com/challenges/diagonal-difference/problem

  2. Left Rotation: https://www.hackerrank.com/challenges/array-left-rotation/problem

  3. Counter game: https://www.hackerrank.com/challenges/counter-game/problem

  4. Time Delta: https://www.hackerrank.com/challenges/python-time-delta/problem

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%