A function gives a name to a group of instructions. local function announce() begins this group; end closes it. announce() calls the function and runs its instructions.
Defining the function does not run it. The call below the definition displays the message.
Call announce() a second time after the first call. Output should show Round starting twice, on separate lines.
Round starting Round starting
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
local function announce()
print("Round starting")
end
announce()Run the starter to see the current behavior, then make the change in the task.
New syntax: local function announce(), end, announce()
A function gives a name to a group of instructions. local function announce() begins this group; end closes it. announce() calls the function and runs its instructions.
Defining the function does not run it. The call below the definition displays the message.
Select a word or symbol in this authored example. Your editor draft stays unchanged.
announce
announceThis 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.