#223. Add and subtract
When the green flag is clicked, this script runs. What is the value of the **score** variable?
when green flag clicked set [score v] to (2) repeat (7) change [score v] by (3) change [score v] by (-3) end
# When the green flag is clicked
score = 2
for _ in range(7):
score += 3
score -= 3
let score = 0;
// When the green flag is clicked
score = 2;
for (let i = 0; i < 7; i++) {
score += 3;
score -= 3;
}
💡 Not sure? Build it in Scratch and try it out.