Task 4 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

10.4 Patterns — count items not in a set

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in countMissing so that it returns how many elements of have are not present in known, counting every occurrence.

Put known into a set first, then test each element of have. The program prints 2 — both copies of x.

Your solution