Code Crew G2 / Week 03 / Thursday
4/6
Week 03 Β· Count With a Box

Thursday

Predict the final number
// A steps box counts every round
⏱ about 15 min
Rocket the inventor holding his engineering tablet

Predict the number!

Rocket has a big question for the crew.

Can we know the final number before Nova flies?

Raven says yes, if we read closely.

Look at where the box starts.

Look at the repeat and the change line.

Then we can predict the end!

WARM-UP: ROUND BY ROUND
  • Track each round.
  • Tap the LAST number Nova says.
set steps to 0
repeat 2 times:
change steps by 1
say steps
?
set steps to 1
repeat 2 times:
change steps by 2
say steps
?
The program: set steps to 1, repeat 2 times, change steps by 3

Three things to read

Where does the box start?

How many rounds does the repeat run?

How much does each round add?

set steps to 1
repeat 3 times:
move right
change steps by 1
Raven the explorer with her wrist computer

What do you notice?

Start at 1. Three rounds. Add 1 each.

The box ends at 4.

The move line does not touch the box.

PREDICT THE FINAL NUMBER
  • Read the start, rounds, and change.
  • Tap what steps holds at the end.
set steps to 2
repeat 2 times:
change steps by 1
?
set steps to 0
repeat 3 times:
change steps by 2
?
set steps to 3
repeat 3 times:
move right
change steps by 1
?

Build a counter that ends with 6.

Nova must say 6 last.

END WITH 6
  • Read each card.
  • The last number Nova says is 6.
1line 1
2line 2
3line 3
4line 4
A test ship flight path that drops down at the same spot

Raven wonders

The auto-pilot counts steps too.

What does steps hold at the drop?

Next week we find out!

TRICKY PREDICTIONS!
  • Read every line.
  • Tap the answer.
set steps to 0
set count to 0
repeat 2 times:
change steps by 1
change count by 2
say steps
?
set steps to 4
repeat 2 times:
lower steps by 1
?
programsteps ends at 4?
set steps to 1, repeat 3 times: change steps by 1?
set steps to 0, repeat 2 times: change steps by 2?
set steps to 2, repeat 3 times: change steps by 1?
set steps to 0, repeat 3 times: change steps by 1?

Prediction pros!

Read where the box starts.

Read the rounds and the change line.

Then predict the end!

Tomorrow: your own flights!

← Wednesday