Teaching Point:


Today we will learn how to use Variables.

What are Variables?


Anyone who uses Programming to make apps or games HAS to use Variables. The word variable means something that changes. In making apps or games, a variable is a block of code that remembers a piece of information, and that information can change. Can we think of examples of things that change in games?

Variables have 2 parts: A name and a piece of information. Then if we want to change information, we tell other blocks of code to change it. For this project we can make a variable to keep score, and set it to 0. Then we tell it to go up by 1 (or more) every time the cat gets a coin.

Today's Assignment


Make a variable for the score. Add change variable by 5 to the code for when the cat gets a coin.

Extension Activity


Think of another variable you can add to make your game more challenging.



Back to School Portal