Question: customer list same as given in example output Q2. printCustomerinfo (customer_list, sort_tuple): It takes two arguments: the customer_list and an additional argument sort_tuple to sort

 customer list same as given in example output Q2. printCustomerinfo (customer_list,
customer list same as given in example output

Q2. printCustomerinfo (customer_list, sort_tuple): It takes two arguments: the customer_list and an additional argument sort_tuple to sort the customers. The default value for sort_tuple is the empty string("'). This function will print the content of customer_list in the following format: , served by , spent minutes. 2A. If the sort_tuple is empty(), no need to sort the customers, prints the content of customer_list as the order it is given: printCustomer info (customer_list, sort_tuple="") Annabel, served by clerk-A, spent 17 minutes. Edgar, served by clerk-B, spent 19 minutes. Felipe, served by clerk-A, spent 10 minutes. 2B. The sort_tuple is given to decide whether to sort by "customer" or by "clerk" or by "minute", and in "ascending" (true) or "descending" (false) order. Note that this sort is only applicable inside this function, this action shouldn't modify the customer_list in-place. For example, sort the customer by minute in descending order: printCustomerInfo (customer_list, sort_tuple=("minute", False)) Edgar, served by clerk-8, spent 19 minutes. Annabel, served by clerk-A, spent 17 minutes. Guoning, served by clerk-D, spent 16 minutes. Save & Run Load History

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 Databases Questions!