Counter-based loops in Python are usually written using range
objects, special sequence-like objects
that can be iterated over only once. When given one integer argument, the range
constructor builds a
range
object representing the integers starting from zero that are less than the argument. For example,
range(10)
represents the sequence $0, 1, \ldots, 9$ because nine is the last integer less than ten.
Therefore, the loop
for i in range(10):
print(i)
prints out the integers from zero to nine.
If the constructor is given two arguments, the range
object will instead represent the integers starting
from the first argument that are less than the second. For instance,
for i in range(2, 10):
print(i)
prints out the integers two through nine.
Fill in the placeholders so that the actual outputs match the expected outputs.