Make a python program that asks the number of items or uses a sentinel loop to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Make a python program that asks the number of items or uses a sentinel loop to end the loop when the user enters -1. It should look up the price for the item inside the loop and add the price for that item into the total. It should show the total at the end. Here are the items sold by your store. (100 po Description Pencil Item Number 1 2 3 4 3 1 1 3 Pen Example of a program run with a counter-controlled loop "How many things are you buying" Paper Eraser [print of the table with a message to pick a number 1-4] 3 "The total bill is 1.60" [print of the table with a message to pick a number 1-4] 3 Item Price .05 [print of the table with a message to pick a number 1-4] 4 .99 1.50 -1 .55 Example of a program run with a sentinel loop [print of the table with a message to pick a number 1-4 or -1 to end] [print of the table with a message to pick a number 1-4 or -1 to end] "The total bill is 3.55" [print of the table with a message to pick a number 1-4 or -1 to end] [print of the table with a message to pick a number 1-4 or -1 to end] Turn in the python program on the grade link as you turn it in for grading. Make a python program that asks the number of items or uses a sentinel loop to end the loop when the user enters -1. It should look up the price for the item inside the loop and add the price for that item into the total. It should show the total at the end. Here are the items sold by your store. (100 po Description Pencil Item Number 1 2 3 4 3 1 1 3 Pen Example of a program run with a counter-controlled loop "How many things are you buying" Paper Eraser [print of the table with a message to pick a number 1-4] 3 "The total bill is 1.60" [print of the table with a message to pick a number 1-4] 3 Item Price .05 [print of the table with a message to pick a number 1-4] 4 .99 1.50 -1 .55 Example of a program run with a sentinel loop [print of the table with a message to pick a number 1-4 or -1 to end] [print of the table with a message to pick a number 1-4 or -1 to end] "The total bill is 3.55" [print of the table with a message to pick a number 1-4 or -1 to end] [print of the table with a message to pick a number 1-4 or -1 to end] Turn in the python program on the grade link as you turn it in for grading.
Expert Answer:
Related Book For
Auditing A Practical Approach
ISBN: 9780730382645
4th Edition
Authors: Robyn Moroney, Fiona Campbell, Jane Hamilton
Posted Date:
Students also viewed these computer network questions
-
On January 1 , 2 0 2 4 , Red Flash Photography had the following balances: Cash, $ 1 3 , 0 0 0 ; Supplies, $ 8 , 1 0 0 ; Land, $ 6 1 , 0 0 0 ; Deferred Revenue, $ 5 , 1 0 0 ; Common Stock $ 5 1 , 0 0...
-
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...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Mrs Anh Thuy is a 43 year old lady admitted following an incidence of blurred vision, numbness down the right side and a sharp pain in her head. A neighbour found her on the ground unable to move or...
-
A futures price is currently 50. At the end of six months it will be either 56 or 46. The risk-free interest rate is 6% per annum. What is the value of a six-month European call option with a strike...
-
Krogstad Corporation bought 1,000 shares of Cole Inc. for $90 per share plus a brokerage fee of $1,800. Three months later, the shares were sold for $110 per share. The brokerage fee on the sale was...
-
Derive an expression for the heat loss conductance \(U_{c}\) for a flat-plate collector in which convection and conductance are completely eliminated in the air layers by use of a hard vacuum.
-
Erica and Bob participate in a friendly Hackathon that allows each to solve one question a day out of the three offered. There will be one easy, one medium and one hard question, with points awarded...
-
Factor: v - 10v+24.
-
The government has just increased taxes. a. Demonstrate the effect on the price level and output in the standard model. b. How would your answer to a differ if there were partial crowding out? c. How...
-
XYZ News announces to their media crew, "The company promises to pay a bonus to all employees who perform excellently and depending also on the financial performance of the company." Can Charie, an...
-
List five examples of tangible benefits.
-
What are the characteristics of development costs and operating costs? List three examples of each kind of cost.
-
What is the objective of the technical feasibility test?
-
What are the four categories of feasibility tests, and what is the criteria each of them uses to measure feasibility?
-
What should be done to follow up the formal presentation?
-
Find the acceleration of a particle with the given position function. r(t)=9 sinti + 10 tj - 6 costk O a(t)=-9 sinri - 9 costj Oa(t)= -9 sinri + 6 costk O a(t)=9 sinfi - 10 rj O a(t) = -9 sinti +9...
-
The words without recourse on an indorsement means the indorser is: a. not liable for any problems associated with the instrument. b. not liable if the instrument is dishonored. c. liable personally...
-
The auditor must consider whether it is appropriate to assume that the client will remain as a going concern: (a) because this means that assets are valued on the basis that they will continue to be...
-
Liam has the task of designing the audit program for the payroll area. There have been no recent changes to the payroll system, or its interface with the general ledger. Among other tests, Liam is...
-
What does assurance mean in the financial reporting context? Who are the three parties relevant to an assurance engagement?
-
What are the pros and cons of virtual teams? What are some of the potential legal issues an organization can encounter with virtual teams?
-
What are the five stages of team development? Describe each stage and how those stages may appear as behaviors in a health care setting.
-
What are the differences among an onsite team, a virtual team, a task force, and a committee? What are some of the potential differences in dynamics between people in these different groups?
Study smarter with the SolutionInn App