#297. 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 (10) repeat (6) change [score v] by (6) change [score v] by (-1) end
# When the green flag is clicked
score = 10
for _ in range(6):
score += 6
score -= 1
let score = 0;
// When the green flag is clicked
score = 10;
for (let i = 0; i < 6; i++) {
score += 6;
score -= 1;
}
💡 Not sure? Build it in Scratch and try it out.