You are asked to write a program for a bookstore that will be launching soon. The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
import pickle def adddata fopenbookdatwb bstore answeryes while answeryes itemtypeinputenter type of ... View the full answer
Related Book For
Financial Reporting and Analysis
ISBN: 978-0078025679
6th edition
Authors: Flawrence Revsine, Daniel Collins, Bruce, Mittelstaedt, Leon
Posted Date:
Students also viewed these programming questions
-
Write code using struct-defined data types Organize source code in multiple header and implementation files (.h and .cpp files). Create, initialize, read, update, and display the contents of struct...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
obias is a foreman at a factory that manufactures auto parts. When a health a safety inspector visits the plant, Tobias notices the inspector writing down several major labor and safety violations....
-
Use the Internet to determine the cities in the United States that have the largest population of the following. Why is this useful to marketers? a) Native Americans b) African Americans c) Hispanics...
-
Biologists who study plants growing high in the Alps found that plants adapted to cold-mountain conditions migrated up the peaks as fast as 3.7 m (12.1 ft) per decade during the 20th century,...
-
What are the five phases in the project management life cycle?
-
Cody Macedo established an insurance agency on January 1 of the current year and completed the following transactions during January: a. Opened a business band account with a deposit of $75,000 in...
-
1 Suppose a computer company is developing a new floating point system for use with their machines. They need your help in answering a few questions regarding their system. The company's floating...
-
To ensure greater efficiency & productivity, the levels of management should be kept to the ______________. maximum. minimum. only three. convenience.
-
Consider a refrigeration cycle which uses CO as a refrigerant in an ordinary vapor-compression cycle. The cycle is to absorb heat at -20C and reject heat at 20C. Assume the compressor is reversible....
-
Intermittent flow is experienced from a cylindrical silo with a conical hopper that is several years old. The design criteria have been checked by re-measuring the powder properties and wall...
-
In equimolar counter diffusion for every mole of one component diffusing in one direction there is, by definition, one mole of the other component diffusing in the opposite direction. In this problem...
-
1. Draw a schematic of the process with annotations indicating the relevant inlet/outlet along with heat/work considerations. 2. Define a system and perform an energy balance to obtain an expression...
-
The dimer component undergoes an elementary decomposition reaction to a gaseous monomer component (M) according to the reaction: D 2 M. The critical temperature of component M is 420 K, and its...
-
Why did bands need a producer? Do you think this changed the music industry?
-
A number of years ago the United Food and Commercial Workers Union organized 800 workers of the 1035 employees at one of the Wilson Brothers food operations in Toronto, Ontario. The employees include...
-
One of the models used for predicting the severity of head injury is shown in Fig. 5.68 where \(f(t)\) denotes the force of blow to the head, \(m_{1}\) is the mass of that part of the head which lies...
-
Write the equations of motion of a multidegree-of-freedom system in matrix form using a. the flexibility matrix, and b. the stiffness matrix.
-
What is a generalized mass matrix?
Study smarter with the SolutionInn App