We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [looping]

Use this tag for questions related to teaching and learning the various forms of repetition in computer programming. Tradeoffs between the various semantic forms can be discussed. This tag is not appropriate for specific recursion questions, though questions relating to comparison of recursive vs repetitive solutions might be.

Filter by
Sorted by
Tagged with
35
votes
13answers
5k views

Teaching the humble for loop

So, in C-style languages, the for loop has a funny little syntax: for (int i = 0; i < 100; i++){ // do something } If ...
6
votes
4answers
665 views

How to teach which loop should be used

In most languages, there are many different types of loops. The most common ones seem to be for loop, while loops, and do while loops. What is the best way to illustrate the differences between the ...
4
votes
7answers
266 views

Pedagogical reasoning behind a minor difference in two loops

I keep seeing examples like the first program bellow, in teaching materials. Is there a pedagogical reason to teach this first program, compared to the second? ...