Can the Cafe Serve the Order?
Python
25 pts
Can the Cafe Serve the Order?
A cafe in Massawa has the drinks in the set available. A group orders the drinks in the list order.
- Loop through
order(the list, so the order is predictable). - For each drink print
drink: yesif it is available, otherwisedrink: no. - Count the drinks that are not available in a variable
missing, and print it at the end.
Expected output:
coffee: yes soda: no milk: yes water: no tea: yes Missing: 2
Checklist
- Keep
availableandorderunchanged and loop through theorderlist. - Count the drinks that are not available in
missing. - Print
yesornofor each drink, then the number missing.
🔑 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.
