示例#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()
示例#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""")
示例#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)
示例#5
0
def prompt_read_book():
    name = input('Enter the name of the book you just finished reading : \n')
    database.read_book(name)
示例#6
0
def prompt_read_book(name):
    return database.read_book(name)
示例#7
0
def mark_read():
    title = input("Enter book title: ")
    database.read_book(title)
示例#8
0
def read():
    name = input("\nEnter the book's name: ")
    author = input("Enter the author's name: ")
    database.read_book(name, author)
示例#9
0
def read_book():
    name = get_book_name()
    database.read_book(name)
示例#10
0
def read_book_prompt():
    have_read = input("Enter name of book to be marked as /read/: ")
    database.read_book(have_read)
示例#11
0
def prompt_read_book():
    book_name = input('Which book would you like to update? ').lower()
    database.read_book(book_name)
示例#12
0
def prompt_read_book():
    name = input('Please enter book name: ')
    database.read_book(name)