Glossary · Phase 0 · Tools
Turtle graphics
Drawing by steering a pen, called a turtle, with commands like forward(100) and left(90). Python's turtle module works this way.
Try it now
Watch spend take each value in turn while total grows. The loop body (line 4) runs four times, then Python moves on to the print.
Learn it properly
Loops · Repeat work over every item without copy-pasting code. About 35 minutes.
Other terms from the same lesson
- loop: Code that repeats: for each item in a list, or while something stays true.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.