If you're seeing this message, it means we're having trouble loading external resources for Khan Academy.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Looping

1 project
1 article
3 challenges
4 talkthroughs
1 skill
Repeating something over-and-over? Loops are here to help!

Intro to While Loops

Sophia shows how to repeat code in your program, using while loops.

More While Loops: Balloon Hopper

Sophia shows how to use a while loop to draw multiple shapes in a row.

Nested For Loops

Pamela explains how to use nested for loops for more complex repeating code.

Project: Build-a-House

<p>Think about your house, or your school building, or your work office. There's a lot of repeating elements - especially on the outside. In this project, you'll use loops to add repeating elements to this house:</p> <ol> <li>Draw a ...