Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- book_list = []
- user_input = input('Welcome! Press Enter to continue or Exit to Quit: ')
- while user_input != 'exit':
- user_input = input('How can I help you?: ').lower()
- if user_input == 'library':
- for book in book_list:
- print(book_list)
- continue
- if user_input == 'add book':
- title = input('Book Title: ')
- book = title
- author = input('Author: ')
- year = input('Publication Year: ')
- genre = input('Genre: ')
- new_book = [f'Title: {title}, Author: {author}, Year: {year}, Genre: {genre}']
- book_list.append(new_book), print('Library Updated!')
- if user_input == 'remove book':
- remove_book = input('which book?')
- if remove_book in book_list:
- for book in book_list:
- book_list.remove(remove_book)
- print('Book Removed!')
- if user_input == 'book count':
- print('book_count')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement