Question: Make a python program that asks the number of items or uses a sentinel loop to end the loop when the user enters -1.

Make a python program that asks the number of items or uses a sentinel loop to end the loop when the user 

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.

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 Computer Network Questions!