Esempio n. 1
0
def menu():
  user_input = input(USER_CHOICE).lower()
  while user_input!='q':
    if user_input=='a':
      add_book()
    elif user_input=='d':
      delete()
    elif user_input=='l':
      list_book()
    if user_input=='r':
      read_book()
    user_input = input(USER_CHOICE).lower()
Esempio n. 2
0
choice = input("""enter a choice
a =add a book
l=get books from list
r=making a book as read
d=deleting a book
q=quit""")
while (choice != 'q'):
    if (choice == 'a'):
        name = input("enter book name")
        author = input("enter author name")
        database.add_book(name, author)
    elif (choice == 'l'):
        l = database.get_books()
        for i in l:
            print(i)
    elif (choice == 'r'):
        name = input("enter a book name")
        database.read_book(name)
    elif (choice == 'd'):
        nmae = input("enter a book name")
        database.delete_book(name)
    else:
        print("invalid key.press a new key.")
    choice = input("""enter a choice
a =add a book
l=get books from list
r=making a book as read
d=deleting a book
q=quit""")
Esempio n. 3
0
def prompt_read_book():
    book_name = input("Enter the name of the book:")
    database.read_book(book_name)
def prompt_read_book():
    name = input('Please, insert the name of the book to mark as read: ')
    database.read_book(name)
Esempio n. 5
0
def prompt_read_book():
    name = input('Enter the name of the book you just finished reading : \n')
    database.read_book(name)
Esempio n. 6
0
def prompt_read_book(name):
    return database.read_book(name)
Esempio n. 7
0
def mark_read():
    title = input("Enter book title: ")
    database.read_book(title)
Esempio n. 8
0
def read():
    name = input("\nEnter the book's name: ")
    author = input("Enter the author's name: ")
    database.read_book(name, author)
Esempio n. 9
0
def read_book():
    name = get_book_name()
    database.read_book(name)
Esempio n. 10
0
def read_book_prompt():
    have_read = input("Enter name of book to be marked as /read/: ")
    database.read_book(have_read)
Esempio n. 11
0
def prompt_read_book():
    book_name = input('Which book would you like to update? ').lower()
    database.read_book(book_name)
Esempio n. 12
0
def prompt_read_book():
    name = input('Please enter book name: ')
    database.read_book(name)