Question: , you are required to create a program that could be used by a bookstore to check their book inventory. Notice the inventory is a
you are required to create a program that could be used by a bookstore to check their book inventory.
Notice the inventory is a dictionary and each element in the dictionary references a list of nested dictionaries, so there are three levels of nesting.
bookinventory William Shakespear"
Key
bookname": "Romeo and Juliet", "yearpub": "price": "quantity":
"Charles Dickens":
bookname": "A Tale of Two Cities", "yearpub": "price": "quantity":
bookname": "Great Expectations", "yearpub": "price": "quantity":
bookname": "Oliver Twist", "yearpub": "price": "quantity":
"James Joyce":
bookname": "Ulysses", "yearpub"; "price"; "quantity";
bookname": "A Portrait of the Artist as a Young Man", "yearpub": "price": "quantity":
bookname": "Dubliners", "yearpub": "price": "quantity":
"Ernest Hemingray"t
bookname": "The
bookname": "A Fareell A pricen, quantity":
"bookname": "Forsewell to Arms", "yearpub": "price": "quantity":
bookname": "The Sun Also Rises", "yearpub": "price": "quantity":
Key$
bookname : "Harry Potter and the Philosopher's Stone", "yearpub": "price": "quantity":
"bookname": "Harry Potter and the Chamber of Secrets", "yearpub": "price": "quantity":
bookname": "Harry Potter and the Prisoner of Azkaban", "yearpub": "price": "quantity":
bookname": "Harry Potter and the Goblet of Fire", "yearpub": "price": "quantity":
Notice the following:
The inventory name is a dictionary named "bookinventory"
The inventory dictionary references authorskeys "William Shakespear", "Charles Dickens" "James Joyce","Ernest Hemingway" and JK Rowling". information for one of the books written by the autor
Instructions:
Add a main function to the main program and create the inventory dictionary shown above in the main function. Make sure it looks like the image shown above.
The purpose of this program is to allow the business owner to check their inventory and calculate totals.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
