code
stringlengths
3
6.57k
input("Please enter the ISBN number of book that you want to check out: ")
i.split(",")
print(colored("There is no book with this ISBN number.", "red")
input("Please enter the student ID to check out: ")
i.split(maxsplit= 1)
print(colored("There is no student with this ID. Try again.", "red")
i.split(",")
print(colored("Oops! This book is already checked out.", "red")
print(colored("Are you sure to check out this book?\n", "blue", "on_grey")
print("ISBN:", colored(numberISBN, "blue")
colored(nameBook, "magenta", "on_grey")
colored(nameAuthor, "yellow")
print(f"\nThis book will checked out to: " + colored(studentName, "white", "on_grey", attrs=['blink'])
input("\nEnter Y or N\n" + colored("> ", "grey", attrs=['blink'])
ticketGenerator(student_id= bookToStudent, book_name= nameBook)
os.system(clean_the_screen)
colored(ticketnumber, "red", "on_cyan", attrs=['reverse', 'blink'])
dataCheckOut.write(f"{numberISBN}-{ticketnumber}-{bookToStudent}-{nameBook}-{nameAuthor}\n")
dataCheckOut.close()
print(colored("\nThe book succesfully checked out to the student.", "green")
i.split(",")
open("books.txt", "r")
file.read()
content.replace("{},{},{},{}".format(numberISBN, nameBook, nameAuthor, checkOut)
format(numberISBN, nameBook, nameAuthor)
file.close()
open("books.txt", "w")
file.write(content)
file.close()
listStudents()
open("checkouts.txt", "r")
file.readlines()
file.close()
open("students.txt", "r")
file.readlines()
file.close()
open("checkins.txt", "r")
file.readlines()
file.close()
len(checkInsLines)
i.split()
print(colored("-" * 80, "grey")
print(colored(f"{sName} {sLastname}", "blue")
x.split("-")
print(colored("-" * 80, "grey")
print(colored(f"\t-{nameBook}", "magenta", "on_grey")
z.split("-")
print(colored("-" * 80, "grey")
print(colored(f"\t-{nameBook}", "magenta", "on_grey")
topThreeBook()
open("checkouts.txt", "r")
file.readlines()
file.close()
open("books.txt", "r")
file.readlines()
file.close()
i.split("-")
isbns.append(isbn)
Counter(isbns)
list(dictionary.values()
range(3)
print("_" * 105)
print(colored("THE MOST CHECKED OUT BOOK(S)
print(colored("THE SECOND MOST CHECKED OUT BOOK(S)
print(colored("THE THIRD MOST CHECKED OUT BOOK(S)
len(val_list)
print("_" * 105)
print(colored(f"This/these book(s)
str(max(val_list)
time(s)
print("_" * 105)
print("\n")
val_list.count(max(val_list)
dictionary.items()
max(val_list)
z.split(",")
print(key)
range(val_list.count(max(val_list)
val_list.remove(max(val_list)
val_list.count(max(val_list)
dictionary.items()
max(val_list)
z.split(",")
print(key)
val_list.remove(max(val_list)
print("There is no other books.")
topThreeStudents()
open("checkouts.txt", "r")
dataCheckOut.readlines()
dataCheckOut.close()
open("students.txt", "r")
dataStudents.readlines()
dataStudents.close()
i.split("-")
studentNumbers.append(stNumber)
Counter(studentNumbers)
list(studentNumbers.values()
range(3)
print("_" * 105)
print(colored("THE TOP #1 STUDENT(S)