Variables
Variables in Code
The same story in real code, across the howin language family.
Step 1
Concept
Putting a value in a box, in code
The drop-in scene from before — but the box is now a single line of code.
Open
Step 2
Concept
Showing it back, in code
Peeking inside is for us. To show the value to others, the program needs to print it.
Open
Step 3
Code
Make a name, say hello
Make a box for a name, then print a greeting.
Open
Step 4
Concept
Replacing what's inside, in code
A small but important difference: making a box vs. changing what's inside one.
Open
Step 5
Code
Bump the count three times
Start at 0, add 1 three times, print after each step.
Open
Step 6
Game
Match types to values
Drag each type chip onto the value where it belongs.
Open
Step 7
Concept
Data types, in code
Some languages show the type right in the line. Others hide it.
Open
Step 8
Concept
Two boxes work together, in code
Read two boxes. Use a math symbol. Store the result in a third box.
Open
Step 9
Code
Score × bonus = total
Multiply two boxes and print the result.
Open
Step 10
Game
The rhythm of a program
Arrange the four steps in the right order.
Open
