code stringlengths 3 6.57k |
|---|
print(colored("THE TOP #2 STUDENT(S) |
print(colored("THE TOP #3 STUDENT(S) |
len(val_list) |
print("_" * 105) |
print(colored(f"This/these student(s) |
str(max(val_list) |
time(s) |
print("_" * 105) |
print("\n") |
val_list.count(max(val_list) |
studentNumbers.items() |
max(val_list) |
z.split(maxsplit= 1) |
print(key) |
range(val_list.count(max(val_list) |
val_list.remove(max(val_list) |
val_list.count(max(val_list) |
studentNumbers.items() |
max(val_list) |
z.split(maxsplit= 1) |
print(key) |
val_list.remove(max(val_list) |
print("There is no other students who has checked out before.") |
addStudent() |
open("students.txt", "r") |
file.readlines() |
file.close() |
input("Please enter the ID of a student to add.\n> ") |
input("\nPlease enter the name of a student to add.\n> ") |
i.split(maxsplit= 1) |
print("This student ID is already exist.") |
print(f"\t{nStudent} - {naStudent}") |
print(colored("\nThe student succesfully added to the data.", "green") |
open("students.txt", "a+") |
file.write(f"{numberStudent} {nameStudent}\n") |
file.close() |
checkInBook() |
input("Please enter the ticket to check in book.\n> ") |
open("books.txt", "r") |
dataBooks.readlines() |
dataBooks.close() |
open("checkouts.txt", "r") |
file.readlines() |
file.close() |
i.split("-") |
print(colored("Thank you for bringing back the book!", "green") |
open("checkins.txt", "a") |
file.write(f"The book in-{ticket}-came back.\n") |
file.close() |
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() |
print(colored(f"Sorry. There is no ticket as '{ticket}'.", "red") |
colored("-" * 48, "red") |
colored("library.py-v1.0", "green") |
random.choice(maxims) |
colored("HELLO FROM WORLD LIBRARY!", "white", "on_blue", attrs=['blink']) |
colored("[1]", "blue") |
colored("[2]", "blue") |
colored("[3]", "blue") |
colored("[4]", "blue") |
colored("[5]", "blue") |
colored("[6]", "blue") |
colored("[7]", "blue") |
colored("[8] List top 3 most checked out books.", "cyan", attrs=['blink']) |
colored("[9] List top 3 student.", "cyan", attrs=['blink']) |
colored("[10]", "blue") |
colored("[11]", "blue") |
colored("[12]", "blue") |
colored("[0]", "red") |
login() |
os.system(clean_the_screen) |
input("Please enter the password to log in.\n> ") |
print(colored("Succesfully logged in!", "green", attrs=['reverse', 'blink']) |
time.sleep(2) |
print(colored("Wrong password!", "red", attrs=['reverse', 'blink']) |
print("Exiting...") |
time.sleep(2) |
os.system(clean_the_screen) |
exit() |
colored("Press 'Enter' to continue to the menu...", "white", "on_grey", attrs=['blink']) |
login() |
os.system(clean_the_screen) |
print(menu) |
input("What would you like to do?\n> ") |
os.system(clean_the_screen) |
listBooks() |
print("-" * 112) |
input(enterToGo) |
os.system(clean_the_screen) |
listBooksChecked() |
print("-" * 115) |
input(enterToGo) |
os.system(clean_the_screen) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.