30
range(5) is like a countdown (or count-up) timer. It creates a sequence of numbers: 0, 1, 2, 3, 4.
Notice it starts at 0 and stops before 5. In coding, we almost always start counting from zero. If you use it in a loop, the loop will run exactly 5 times. Think of it as a repetition tool.
Log in to add a comment.