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.
```
book_inventory ={\William Shakespear"
Key1
```
```
{"book_name": "Romeo and Juliet", "year_pub": 1597, "price": 12.99, "quantity": 60}}
"Charles Dickens": [
{"book_name": "A Tale of Two Cities", "year_pub": 1859, "price": 9.56, "quantity": 75},
{"book_name": "Great Expectations", "year_pub": 1861, "price": 12.50, "quantity": 60},
{"book_name": "Oliver Twist", "year_pub": 1837, "price": 9.75, "quantity": 50},
1.
"James Joyce":
{"book_name": "Ulysses", "year_pub"; 1922, "price"; 19.99, "quantity"; 30},
{"book_name": "A Portrait of the Artist as a Young Man", "year_pub": 1916, "price": 13.20, "quantity": 25},
book_name": "Dubliners", "year_pub": 1914, "price": 12.00, "quantity": 35},
1.
```
```
"Ernest Hemingray"t \\
{"book_name": "The [
{"book_name": "A Fareell A \ pricen, 10.35, quantity": 80},
"book_name": "For_sewell to Arms", "year_pub": 1929, "price": 14.75, "quantity": 45},
{"book_name": "The Sun Also Rises", "year_pub": 1926, "price": 12.99, "quantity": 55}
Key5\,\$,
```
```
{"book_name : "Harry Potter and the Philosopher's Stone", "year_pub": 1997, "price": 16.62, "quantity": 100},
"book_name": "Harry Potter and the Chamber of Secrets", "year_pub": 1998, "price": 22.99, "quantity": 90},
{"book_name": "Harry Potter and the Prisoner of Azkaban", "year_pub": 1999, "price": 23.99, "quantity": 85},
{"book_name": "Harry Potter and the Goblet of Fire", "year_pub": 2000, "price": 25.99, "quantity": 80}
]}
```
Notice the following:
1. The inventory name is a dictionary named "book_inventory"
2. The inventory dictionary references 5 authors(keys), "William Shakespear", "Charles Dickens" "James Joyce","Ernest Hemingway" and "J.K. Rowling". information for one of the books written by the autor
Instructions:
1. 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.
2. The purpose of this program is to allow the business owner to check their inventory and calculate totals.
, you are required to create a program that could

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!