Transfer practice · Define an announce function that displays two messages: Ready then Go. Call it once, so those two lines appear once each.
v3 · Activity 1 of 1 · functions · 4 min Runs here
Use a familiar idea in a different task. Read the changed requirement before running.
Define an announce function that displays two messages: Ready then Go. Call it once, so those two lines appear once each.
Ready Go
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.