Transfer practice · Store the number 20 in a local variable. Display its value, then the text "Saved for this run". The value and the message need separate print calls.
v3 · Activity 1 of 1 · local-variables · variable-reading · 3 min Runs here
Use a familiar idea in a different task. Read the changed requirement before running.
Store the number 20 in a local variable. Display its value, then the text "Saved for this run". The value and the message need separate print calls.
20 Saved for this run
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
local score = 7
print(score)The name score refers to the stored number 7.
This activity reuses syntax you have already met.
local introduces a local variable. coins is its name, = assigns a value, and 10 is the starting value. Without quotation marks, print(coins) reads the value under that name.
Select a word or symbol in this authored example. Your editor draft stays unchanged.
10
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.