Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are asked to write a program for a bookstore that will be launching soon. The bookstore has three types of items: textbooks, apparels,


image

You are asked to write a program for a bookstore that will be launching soon. The bookstore has three types of items: textbooks, apparels, and gift items. Each item has an item name and sales price. Initially, the store can have a maximum of 100 items. The bookstore is offering an opening discount on items as follows: Item Type Discount Textbook 3% Apparel 5% Gift items 10% Create a program that will keep track of the bookstore items. Your program will continuously prompt the user to enter items, one at a time, until the user has indicated that they are finished entering items. For each item, your program must also prompt for the type of the item to determine the discount amount and calculate the sales price. You must validate the item type, name and price providing an error message and re-prompting the user if an invalid input is entered. Keep track the number of items in each category. Once the items are entered, the program should allow the user to search an item by its name. If the item is found, it will show the sales price of the item, otherwise it will display a message that the item is not available at this store. At the end, print a well formatted report listing all the items and their associated price, the total number of items in each type and the average price of all items.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

import pickle def adddata fopenbookdatwb bstore answeryes while answeryes itemtypeinputenter type of ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Reporting and Analysis

Authors: Flawrence Revsine, Daniel Collins, Bruce, Mittelstaedt, Leon

6th edition

9780077632182, 78025672, 77632184, 978-0078025679

More Books

Students also viewed these Programming questions