Unit 4 · 3 lessons
Looping
Repetition in Java — while, do-while and for loops, the accumulator pattern, nested loops, and the off-by-one errors that quietly ruin all of them.
- 33 practice questions
- 30 flashcards
- 2 interactive lessons
Lessons
- 1while and do-whileThe three parts every loop needs, what happens when one is missing, and the two loops that test their condition at opposite ends of the body.Interactive11 questions
- 2for Loops and CountingThe counting loop taken apart piece by piece, why programmers start at 0, and the off-by-one error that comes from one wrong character.11 questions
- 3Accumulators, Counters and Nested LoopsBuilding a result one pass at a time, choosing the right starting value, and putting one loop inside another to work through rows and columns.Interactive11 questions