You will write three functions that test quantified claims on a finite set of numbers.
The idea. "For every in the set, " is true when no fails. "There exists with " is true when at least one works. A counterexample is an for which is false.
Your tasks.
for_all(P, values).exists(P, values).counterexamples(P, values). Return the list of values for which P is false, in order.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…