Transfer practice · Store the number 7 in one local variable. Read it in two print() calls without changing it. Both lines should display 7.
v3 · Activity 1 of 1 · local-variables · variable-reading · assignment · 2 min Runs here
Use a familiar idea in a different task. Read the changed requirement before running.
Store the number 7 in one local variable. Read it in two print() calls without changing it. Both lines should display 7.
7 7
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.