Lab 5: Loops

Solutions

A simple diagram of the flow of a loop A flowchart showing that when entering a loop, the loop condition is evaluated, and if it is false, the program continues past the loop. However, if the condition is true, the loop executes the loop body (conditional code) and then returns to the start of the loop where it proceeds to check the conditinon again.
 
A more engaging example of a loop in action A short animation of two hands holding an anthropomorphic bao (a kind of Chinese bun); the hands bring the bao closer to the viewpoint as the bao smiles and waves its arms.
[From the Pixar short: Bao]

Lab Setup

Table of Contents

Big Questions