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 08:50
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
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
question
Mathematics, 08.12.2021 19:00
question
Mathematics, 08.12.2021 19:00
question
History, 08.12.2021 19:00