v3 · Activity 1 of 8 · local-variables · variable-reading · assignment · 2 min Runs here
coins stores the number 10. print(coins) displays the value stored under that name. Run the example before changing it.
Press Run code to display the number 10 stored in the local variable.
10
Lines must stay in order. Spelling, capitalization and spaces inside a message matter.
local score = 7
print(score)score stores 7 and print reads its value.
New syntax: local, =, coins
local introduces a local variable; coins is its name; = assigns the starting value 10. print(coins) reads that value.
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.