subject

#The following script defines a list of customer orders. Each item in the list is a tuple containing the name of the item, the number requested, and the price per item. #Fill in just the process_order function below without changing any other code. This function should remove one of the elements of the order list and print a nice message about it each time through the loop. Finally, make sure that the final print statement correctly displays the total price for the entire list.
#Example:
#You filled an order for 1 antacid for a total of $5.33
#You filled an order for 3 sour bites for a total of $6.99
#You filled an order for 1 gummy bears for a total of $1.99
#You filled an order for 4 oranges for a total of $12.88
#Total price: $27.19
total = 0
def process_order(x_list):
# YOUR CODE HERE
raise NotImplementedError()

# DO NOT CHANGE ANY OF THE CODE BELOW HERE #

x = [("oranges", 4, 3.22),("gummy bears",1,1.99),("sour bites", 3, 2.33), ("antacid", 1, 5.33)]
while(len(x)>0):
process_order(x)
print("Total price: ${:.2f}".format(total))

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
1. web and mobile applications allow users to be actively engaged in an online activity. a true b false 2. some examples of business applications purposes are to collaborate, share files, meet virtually in real-time, and accept payments. a true b false 3. an education application would most likely do which of the following? a allow users to watch popular movies and tv shows b connect users with social and business contacts c confirm users' travel plans d teach users a new language 4. a uniform resource locator (url) is how the internet knows where to take users when an address is typed into a browser. a true b false 5. deon is required to provide the citation information for his sources. what type of information should he collect from his sources? a author name, title, date of publication, date of access, url b connections to background information c interesting facts and statistics d notes on important information
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
Answers: 1
You know the right answer?
#The following script defines a list of customer orders. Each item in the list is a tuple containing...
Questions
Questions on the website: 13722361