Bring a small lobby to life
Let code do the addition
v7 · Activity 6 of 8 · Scores · 2 min Runs here
Workshop progress · step 6 of 8
Chapter outline
The + symbol adds two numbers. In print(2 + 3), Luau calculates 5 and then displays it.
Without quotation marks, 12 + 8 is a calculation. Inside quotation marks, "12 + 8" is just text.
Your task
Use + inside a print call to display the numeric result of 12 + 8. A calculated value stored in a local variable is also accepted.
Expected output
20
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
How your work is checked
The required syntax is stated in Your task. The Luau parser checks for addition; the output check verifies the stated result. It does not trace every intermediate variable value.
Syntax in this activity
New syntax: +
Earlier ideas used here
- numbers
- printing
What this exercise checks
Actual Output · exact lines and order · extra output forbidden.
Successful execution is required. A compile error, runtime error or execution limit never completes this task.
Whitespace, matching single or double quotes, and different variable names are allowed. Output-only tasks accept any valid Luau solution meeting the displayed result and value types. Construct tasks use the stated straight-line form.
Lesson requirements: addition. These are exercise requirements, not Luau syntax rules.
Compare two programs
Predict which one calculates. Run both to see their actual Output. This experiment does not change your answer.
Calculate a value
print(12 + 8)Display literal text
print("12 + 8")Explain this code
Select a word or symbol in this authored example. Your editor draft stays unchanged.
Use + inside a print call to display the numeric result of 12 + 8. A calculated value stored in a local variable is also accepted.
Run code to see what happens. Check solution to test the activity.
Reset starter
Replace this code with the starter? Download your draft to keep a copy.
Code
LuauYour output will appear here.
Sign in with RoCreators to save private progress across devices. Community verification is separate.