NEBians
search Sign In Register

First Steps: Robot on a Mission

Lesson 1 of 3 Coding game schedule15 min

Loading simulation…

sports_esportsPlay with the blocks and run your code

flagWhat you'll discover

  • arrow_forwardBuild a program by snapping blocks into a sequence
  • arrow_forwardPredict where the robot will end up before pressing Run
  • arrow_forwardFix a buggy program by checking each step in order
  • arrow_forwardUse the Step button to watch one instruction at a time

A program is a recipe

A computer program is simply a list of instructions, followed one at a time, from top to bottom. It works exactly like a recipe: first crack the egg, then beat it, then pour it in the pan. Swap two steps and you get a mess! In this lesson each block is one instruction, and your robot follows your list exactly. Computers never guess, never skip ahead, and never "know what you meant" — that is both their superpower and the reason programming feels tricky at first.

The order matters

Programmers call an ordered list of instructions a sequence. If the robot must walk two squares and then turn, the blocks must appear in exactly that order. When your robot bumps a wall, it almost always means one instruction is wrong or out of order. Reading your program from top to bottom while imagining the robot moving — programmers call this tracing — is the single most useful skill you will learn today, and professionals do it every single day.

Bugs are normal

When a program does the wrong thing, the mistake is called a bug. The name became popular in 1947 when engineers found an actual moth stuck inside the Harvard Mark II computer! Every programmer on Earth writes bugs every day — beginners and experts alike. What makes someone a good programmer is not avoiding bugs, but calmly finding them. Use the Step button to run your blocks one at a time and watch exactly where the robot goes wrong. That is real debugging.

Loop the Loop arrow_forward

quizCheck your knowledge

1. What is a computer program?
2. Your robot needs to go forward 2 squares then turn left. Which program works?
3. What is the best first step when your program has a bug?