Shop Customers Report
Python
30 pts
Shop Customers Report
A shop in Mendefera recorded its customers on Monday and Tuesday. Create:
new_on_tuesday— customers who came on Tuesday but not on Mondaycame_both— customers who came on both daysone_day_only— customers who came on exactly one dayall_customers— start withset(), then useupdate()twice to add both days
Print the first three with sorted(), then the number of all customers.
Expected output:
['Merhawi', 'Yonas'] ['Abel', 'Helen'] ['Merhawi', 'Ruta', 'Selam', 'Yonas'] 6
Checklist
- Keep
mondayandtuesdayunchanged and createnew_on_tuesday. - Create
came_both. - Create
one_day_only. - Create
all_customers: start withset(), then useupdate()twice. - Print the first three sorted, then the number of all customers.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
