Code Crew G3 / Week 04 / Tuesday
2/6
Week 04 Β· Variables

Tuesday

// Boxes that hold things

Tuesday: Cup & Counter

Imagine three paper cups. Each cup has a name. Right now each cup holds a number.

score   = 0
lives   = 3
level   = 1

Update each cup

After Rocket scores a goal:

score =

After Raven loses a life:

lives =

After both finish a level:

level =
Try Without Paper
Find 3 things in your room you could be a 'cup' for: a piggy bank,
a chore chart, the days till your birthday. They're all variables.

Wednesday: Math With Boxes

When the value is a number, you can ADD to it or SUBTRACT from it.

score = 0
score = score + 1     (Now score = ?)
score = score + 2     (Now score = ?)
score = score + 5     (Now score = ?)
After step 2: score = ____
After step 3: score = ____
After step 4: score = ____
lives = 5
lives = lives - 1     (Now lives = ?)
lives = lives - 2     (Now lives = ?)
After step 2: lives = ____
After step 3: lives = ____
← Monday