All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Loop variable?

Definition 16.3 Primary & Middle School Computer Science · Chapter 16 — Repeating with for: Turtle Drawings

In for i in range(4):, i is the loop variable: a variable that the loop sets to 0 the first time, then 1, 2 and 3. It can be used inside the block.

Read in context →