1. Use a comment with your full name and student ID. 2. Create a list info[]...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Use a comment with your full name and student ID. 2. Create a list info[] with your full name and student ID as its elements. 3. Create 2 lists named prices[] and items[]. 4. Using a loop, will ask the user to enter the prices for 3 purchased products one at a time and place them in the prices[] list. 5. Using a loop, will ask the user to enter the number of items of each purchased product, one at a time and place them in the items[] list. Only valid numbers can be accepted. 6. Using loops, it will populate a list with the total cost of each product. 7. After all data has been received and produced, displays your full name and student ID in two lines. It then displays the user entered items and prices, using the data in the lists. It finally displays each item, its price and total cost as shown in the sample run. Please enter the price for item 1: 2.49 Please enter the price for item 2: 10.69 Please enter the price for item 3: 75.90 8. The output should be similar to the sample run, with the proper spacing 1 mark and formatting. Total: Sample run: Petros Passas 123-456-789 2 marks Prices: [2.49, 10.69, 75.9] Items: [2, 5, 10] 2 marks 2 items at $2.49 ==> = $4.98 5 items at $10.69 ==> = $53.45 10 items at $75.90 ==> = $759.00 2 marks 3 marks Please enter the number of items purchased for procuct 1: 2 Please enter the number of items purchased for procuct 2: -5 You entered an invalid number. Please try again. Please enter the number of items purchased for procuct 2: 5 Please enter the number of items purchased for procuct 3: 10 10 marks 1. Use a comment with your full name and student ID. 2. Create a list info[] with your full name and student ID as its elements. 3. Create 2 lists named prices[] and items[]. 4. Using a loop, will ask the user to enter the prices for 3 purchased products one at a time and place them in the prices[] list. 5. Using a loop, will ask the user to enter the number of items of each purchased product, one at a time and place them in the items[] list. Only valid numbers can be accepted. 6. Using loops, it will populate a list with the total cost of each product. 7. After all data has been received and produced, displays your full name and student ID in two lines. It then displays the user entered items and prices, using the data in the lists. It finally displays each item, its price and total cost as shown in the sample run. Please enter the price for item 1: 2.49 Please enter the price for item 2: 10.69 Please enter the price for item 3: 75.90 8. The output should be similar to the sample run, with the proper spacing 1 mark and formatting. Total: Sample run: Petros Passas 123-456-789 2 marks Prices: [2.49, 10.69, 75.9] Items: [2, 5, 10] 2 marks 2 items at $2.49 ==> = $4.98 5 items at $10.69 ==> = $53.45 10 items at $75.90 ==> = $759.00 2 marks 3 marks Please enter the number of items purchased for procuct 1: 2 Please enter the number of items purchased for procuct 2: -5 You entered an invalid number. Please try again. Please enter the number of items purchased for procuct 2: 5 Please enter the number of items purchased for procuct 3: 10 10 marks
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Duplicate records created in the 2nd quarter: 600 Total registrations for 2nd quarter: 30,000 Round to the the nearest percent. Please write the formula, fill it in, then solve. 2 points for each...
-
1. Insert a module and create a subroutine named Receipt(). Excel 2. Place a button with the name "Generate Receipt" that would link to this subroutine when clicked. Do the following parts from 3 to...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
The annual revenues associated with several large apartment complexes are $300, $450, $425, $50, $75, and $150 for years 0, 1, 2, 3, 4, and 5, respectively. Determine the net cash flow and whether...
-
Treatment of D-mannose with methanol in the presence of an acid catalyst yields four isomeric products having the molecular formula C7H14O6. What are these four products?
-
The Chorus Company manufactures and sells pens. Present sales output is 5,000,000 units per year at a selling price of $0.60 per unit. Fixed costs are $1,080,000 per year. Variable costs are $0.36...
-
The probability that a person will be able to swim 20 miles is 40%. Classify the statement as an example of classical probability, empirical probability, or subjective probability. Explain your...
-
The new director of special events at a large university has decided to completely revamp graduation ceremonies. Toward that end, a PERT chart of the major activities has been developed. The chart...
-
Leadership is an evolving journey, and its effectiveness greatly depends on the chosen leadership theory and one's ability to adapt and grow as a leader. The paper presents a personal leadership...
-
The T. Boom Pickens Corporation has a $1 million capital structure and always maintains this book value amount. Pickens currently earns $250,000 per year before taxes of 50 percent, has an all-equity...
-
What is CRR and SLR?
-
homas, a CFA charterholder, is a financial analyst for GKV Investments. He is assigned to prepare a report on HXT Electronics, a company in which he recently inherited a substantial number of shares....
-
A carpenter holds a 14-lb 2-in. by 4-in. board as shown. If he exerts vertical forces on the board, determine the forces at A and B (use positive if the force is up and negative if down). A Answers:...
-
Here is a case. Taylor is originally from Ghana and wears a Kente cloth formal wear to work; Taylor identifies as "they" has visible tattoos. wears body piercings, is over 50 years old and has 30...
-
Use the simplex method to solve. 13. Minimize subject to: with 14. Minimize subject to: w = 5y + 2y 2y + 3y = 6 2y + y = 7 y = 0, y = 0. W w = 2y + 3y 2y + 3y = 15 5y + 6y = 35 with 0, 0. (Hint:...
-
O O 1. Someone in my immediate family [ a parent, sibling, aunt. uncle, or grandparent) developed cancer before age 50. O O 2. I am African American. O O 3. I have never had a job where I was exposed...
-
Which of the following would be included in net income but not in annual cash flows? Multiple Choice Sales revenue Depreciation Initial investment Direct labor
-
Discuss whether responsible human resources management should apply different standards for the home company and suppliers, for developed countries and developing countries, and for large companies...
-
During 2012, Tom sold Sears stock for $10,000. The stock was purchased 4 years ago for $13,000. Tom also sold Ford Motor Company bonds for $35,000. The bonds were purchased 2 months ago for $30,000....
-
Joan is a self-employed attorney in New York City. Joan took a trip to San Diego, CA, primarily for business, to consult with a client and take a short vacation. On the trip, Joan incurred the...
-
Jenny earns $34,500 in 2012. Calculate the FICA tax that must be paid by: Jenny: ..............................Soc,Sec. ..................$______________...
-
Consider the situation illustrated in Figure 25. 11. A positively charged particle is lifted against the uniform electric field of a negatively charged plate. Ignoring any gravitational interactions,...
-
A positively charged particle is moved from point A to point B in the electric field of the massive, stationary, positively charged object in Figure 25. 12. (a) Is the electrostatic work done on the...
-
Figure 25. 13 shows both the electric field lines and the equipotentials associated with the given charge distribution. (a) Is the potential at point A higher than, lower than, or the same as the...
Study smarter with the SolutionInn App