← back to unit
Easy
# basics loops
range(start, stop)
range() can take two numbers: where to start, and where to stop (not included):
for i in range(2, 6):
print(i)
prints:
2
3
4
5
Your turn: read start and stop. Print every number from start up to (not including) stop, one per line.
💡 need a hint?
pyb-loop-range-start-stop.py🔒 given lines are locked — write your code in between
loading...