Is the School Bag Ready?
Python
15 pts
Is the School Bag Ready?
Abel needs a pen, a notebook and a ruler. His bag contains the items in the set bag.
- Create
ready—Trueif every item inrequiredis inbag. Useissubset(). - Create
no_toys—Trueifbaghas nothing in common withtoys. Useisdisjoint(). - Print both variables.
Expected output:
True True
Checklist
- Keep the three sets unchanged and create
readywithissubset(). - Create
no_toyswithisdisjoint(). - Print both variables.
🔑 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.
