Write a python application to simulate an Online Book Shop. Notes: Option 1 and Option 2 must display the list of books to the user. The Main function accounts for invalid options. Program displays error message for invalid user option, invalid ISBN number or any invalid title.The programmer can create the book title, price, and ISBN information for the books. Each item consists only one string of comma-separated data: book ISBN number, title, and price. A customer can purchase some books either by ISBN number and/or by title. If the user input an invalid number or book title, the program should display an error message. The user can stop shopping with “checkout” option , which triggers the checkout() function that computes the total cost of the books in the cart. A customer will be provided the following menu option while shopping at the book shop: Option 1. Purchase by ISBN: User can purchase a book by its ISBN number. ISBN stands for International Standard Book Number. This is a unique book identifier number. After user hits option 1, program will display all the available books in the store. User chooses the ISBN number and adds the item in a cart. Option 2. Purchase by Title: User can purchase a book by its title. After user hits option 2, program will display all the available books in the store. User chooses the right title and adds the item in a cart. Option 3. Checkout: User selects checkout option to calculate the total of the purchase. This will invoke a checkout function and display the items in the cart and their total. Option 4. Quit Application: Exits Program Implementation Requirements: 1. Dictionary: You need to build two main dictionaries before the user menu: a) a key for the book ISBN number, value is a list of book’s title and price. b) a key of the name of the book, value is a list of ISBN number and price. 2. Cart List: The cart should be implemented as a list of book’s ISBN number.
Write a python application to simulate an Online Book Shop.
Notes: Option 1 and Option 2 must display the list of books to the user. The Main function accounts for invalid options. Program displays error message for invalid user option, invalid ISBN number or any invalid title.The programmer can create the book title, price, and ISBN information for the books.
Each item consists only one string of comma-separated data: book ISBN number, title, and price. A customer can purchase some books either by ISBN number and/or by title. If the user input an invalid number or book title, the program should display an error message. The user can stop shopping with “checkout” option , which triggers the checkout() function that computes the total cost of the books in the cart. A customer will be provided the following menu option while shopping at the book shop:
Option 1. Purchase by ISBN: User can purchase a book by its ISBN number. ISBN stands for International Standard Book Number. This is a unique book identifier number. After user hits option 1, program will display all the available books in the store. User chooses the ISBN number and adds the item in a cart.
Option 2. Purchase by Title: User can purchase a book by its title. After user hits option 2, program will display all the available books in the store. User chooses the right title and adds the item in a cart.
Option 3. Checkout: User selects checkout option to calculate the total of the purchase. This will invoke a checkout function and display the items in the cart and their total.
Option 4. Quit Application: Exits Program
Implementation Requirements: 1. Dictionary: You need to build two main dictionaries before the user menu: a) a key for the book ISBN number, value is a list of book’s title and price. b) a key of the name of the book, value is a list of ISBN number and price. 2. Cart List: The cart should be implemented as a list of book’s ISBN number.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images