A loop tells the computer to do something again and again. Save time, write less code!
Loops & Patterns
See how loops draw shapes.
π Lessons
π
π
A "for loop" runs a set number of times. "Repeat 4 times: draw a line and turn 90Β°" β makes a square!
βΎοΈ
A "while loop" runs while something is true. "While game is not over: keep playing".
π
Loops can draw spirals, flowers, stars. Try changing the angle and number of repeats!
βοΈ
Nested loops: a loop inside a loop. Like rows and columns in a grid. Powerful!
Score: 0 Β· Question 1