Lesson 5 of 9
Test the tricky case
Show on a big screenYour rule: give one sweet to each friend, again and again. Stop when no sweets are left. You try it with 3 friends and 13 sweets. It works. Is the rule done?
Loading lab…
No. Try zero friends. Nobody can take a sweet, so the rule never stops.
Step 1 of 4
- Give 1 sweet to each friend, round and round.
- With 3 friends, it finishes — 13 shared out.
- With 0 friends, nobody is there to give to.
- The same rule now never stops by itself.
A rule that works once can fail on another case.
So test a tricky case too. Try zero, the biggest number or the smallest.
Try the lab to finish this lesson.