Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
For beginning programmers, you should check your loop as follows.
Check the first case to make sure that the loop starts correctly.
Check the last case to make sure that the loop ends correctly. This case is usually harder than the first case.
A professional programmer would determine the loop invariant and prove the loop correct for all possible cases, but that is beyond the scope of this course.