Source: Adapted from [1 p. 85-86]
Watch Mark Zuckerberg, who created Facebook, explain the concept of loops when programming:
Practice
- Try a triangle; can you find a pattern to repeat using the repeat loop?
- Try an octagon; can you find a pattern to repeat using the repeat loop?