Exploring loops in pseudocode and flowcharts
The nature of loops can often confuse inexperienced programmers, especially when designing a program. Typically, the easiest way to hammer in the concept is to first look at the concept of loops in terms of both pseudocode and flowchart examples. Therefore, in this section, we’re going to look at designing loops in both pseudocode and with a flowchart.
Exploring loops with pseudocode
Depending on what you’re working on or where you’re at in your programming journey, working out a loop with pseudocode can often greatly help conceptualize the needed logic. To teach the concept of loops, a good example to work through is a blinking light program. The steps to make a light blink are straightforward. The program will turn on a light, wait for a period of time, and then turn the light off. However, this will only flash the light once, and we want to continuously blink the light. To accomplish this, we need to loop the...