A for loop runs its block once for each number from the start to the end. Here round is 1, then 2, then 3.
Change the final limit so this loop displays the numbers 1, 2, 3, and 4.
1 2 3 4
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
for step = 1, 2 do
print(step)
endThe loop prints 1 and then 2, once for each value of step.
New syntax: for round = 1, 3 do, end
do begins the repeated block; end closes it. The loop variable changes for each repetition. A limit of 3 includes the number 3.
Select a word or symbol in this authored example. Your editor draft stays unchanged.
round 1, 3
round
This is a private experiment copy. It does not replace your answer or complete the activity.
Your output will appear here.
Replace this code with the starter? Download your draft to keep a copy.
Your output will appear here.
Sign in with RoCreators to save private progress across devices. Community verification is separate.