code stringlengths 3 6.57k |
|---|
i.split(",") |
colored(f"{splitted[0]}", "blue") |
colored(f"{splitted[1]}", "magenta", "on_grey") |
colored(f"{splitted[2]}", "yellow") |
colored("Book is not in the library.", "red") |
colored("Book is in the library.", "green") |
print("-" * 115) |
print(f"Name: {nameBook} - Author: {nameAuthor} - Status: {checkOut} - ISBN: {numberISBN}\n") |
listBooksChecked() |
open("books.txt", "r") |
file.readlines() |
file.close() |
i.split(",") |
colored(f"{splitted[0]}", "blue") |
colored(f"{splitted[1]}", "magenta", "on_grey") |
colored(f"{splitted[2]}", "yellow") |
print("-" * 115) |
print(f"Name: {nameBook} - Author: {nameAuthor} - ISBN: {numberISBN}\n") |
print("-" * 115) |
print(colored("\tUhm..- Nobody reads books these days.\n", "blue") |
print("There is no checked out book. All the books are in the library.") |
addBook() |
open("books.txt", "r") |
file.readlines() |
file.close() |
input("Please enter the ISBN number: ") |
input("Please enter the name of book: ") |
input("Please enter the author name: ") |
i.split(",") |
print(colored("There is already a book with this ISBN.", "red") |
print(f"\t{isbn} - {nBook}") |
print(colored("\nThe book succesfully added to the data.", "green") |
open("books.txt", "a+") |
file.write(f"{isbn},{nameBook},{nameAuthor},{status}") |
file.close() |
searchBookISBN() |
open("books.txt", "r") |
file.readlines() |
file.close() |
input("Enter the ISBN number of book which you are looking for.\n> ") |
i.split(",") |
colored(f"{splitted[0]}", "blue") |
colored(f"{splitted[1]}", "magenta", "on_grey") |
colored(f"{splitted[2]}", "yellow") |
colored("is not in the library.", "red") |
colored("is in the library.", "green") |
searchingISBN.upper() |
print("-" * 95) |
print(colored(f"{numberISBN}", "blue") |
print("-" * 95) |
print("Sorry. There is no book with this ISBN number.") |
searchBookName() |
open("books.txt", "r") |
file.readlines() |
file.close() |
input("Enter the name of book which you are looking for.\n> ") |
i.split(",") |
colored(f"{splitted[0]}", "blue") |
colored(f"{splitted[1]}", "magenta", "on_grey") |
colored(f"{splitted[2]}", "yellow") |
colored("Book is not in the library.", "red") |
colored("Book is in the library.", "green") |
searchingName.lower() |
nameBook.lower() |
print(colored("-" * 95, "cyan") |
print(f"ISBN: {numberISBN} - Name : {nameBook} - Author: {nameAuthor} - Status: {checkOut}\n") |
print(colored("-" * 95, "magenta") |
print("Sorry. There is no book with this name.") |
searchBookAuthor() |
open("books.txt", "r") |
file.readlines() |
file.close() |
input("Enter the author name which you are looking for: ") |
i.split(",") |
colored(f"{splitted[0]}", "blue") |
colored(f"{splitted[1]}", "magenta", "on_grey") |
colored(f"{splitted[2]}", "yellow") |
colored("Book is not in the library.", "red") |
colored("Book is in the library.", "green") |
searchingAuthor.lower() |
nameAuthor.lower() |
print("-" * 95) |
print(f"Author: {nameAuthor} - Name : {nameBook} - ISBN: {numberISBN} - Status: {checkOut}\n") |
print(colored("Sorry. There is no author with this name.", "red") |
ticketGenerator(student_id, book_name) |
join(random.sample(chars, 6) |
open("tickets.txt", "a+") |
file.readlines() |
i.split("-") |
ticketGenerator() |
file.write(f"{ticket}-{book_name}-{student_id}\n") |
file.close() |
checkOutBook() |
open("books.txt", "rt") |
file.readlines() |
file.close() |
open("students.txt", "r") |
file.readlines() |
file.close() |
open("checkouts.txt", "a") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.