๐ LOCKED
๐ The Halloween Code Day unlocks , 14 days before Halloween.
Teachers: add ?preview=1 to the address to open it early.
๐ HALLOWEEN CODE DAY
Haunted House Algorithm
A robot has to walk through a haunted house and collect 3 pieces of candy without touching a ghost. Write the exact steps (an algorithm) it should follow.
- Draw a 4x4 grid. Put a start square, 3 candy squares and 2 ghost squares on it.
- Write a list of moves using only: forward, turn left, turn right, grab.
- Trade lists with a partner. Follow their steps EXACTLY, like a computer would.
- Did the robot get all 3 candies? If not, find the bug and fix it.
Level up: Grades 3-8: Can you shorten your list using a repeat? Example: repeat 3 [forward].
Binary Pumpkins
Binary numbers
Light up pumpkins (bits) to match the target number.
> run binary-pumpkins.exe
Bug Hunt
Debugging
Ghosts hid bugs in the code. Tap the broken line before time runs out.
> run bug-hunt.exe
Haunted Maze
Sequencing & algorithms
Give the robot a list of arrow commands, then press Run.
> run haunted-maze.exe
$ cat fact.txt