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 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
You know the right answer?
#The following script defines a list of customer orders. Each item in the list is a tuple containing...
Questions
question
Mathematics, 24.04.2020 21:28
question
Chemistry, 24.04.2020 21:28
question
Biology, 24.04.2020 21:28
Questions on the website: 13722361