Learn with tiles › 20
Raising the score
Increase the number in a variable.
1
You can change the value in a variable. That is why we use variables to count a score.
The increase score by (1) tile adds 1 to the number in the box and puts the result back.
Make the score go up each time you tap Lara.
To do Each time you tap Lara, increase score by 1 and then say the score.
Loading tiles…
2
"increase by" adds to the value now in the box. set score to (0) throws the old value away and puts in a new one.
Make the score go back to 0 when you press the space key.
Tap "increase by" on the tile to change it to "set to" or "decrease by". Decrease takes that much away from the number in the box.
To do When the space key is pressed, set score to 0 and say the score.
Loading tiles…