Robotics · lesson 25 of 30 · free

The state of a robot — Robotics for kids

The state of a robot is all its values right now: where it is, which way it faces, its speed, its battery level and what it is carrying. To find the state after a program, trace it: go line by line and write the value after each one. “speed = 20” sets the speed; “speed = speed + 10” adds 10; “speed = speed − 5” takes 5 away. A loop that repeats 10 times uses its battery cost 10 times.

▶ Watch how it works

Got it? Practise ↓

Robot tip

Trace and write — “write the value after every line; the last change wins”

  1. Set (=) replaces the value; + adds; − takes away.
  2. Write the value after every line; the last change is the answer.
  3. In a loop, multiply: repeat 10 { 3% } uses 30%.

Use it for: Reading and debugging robot programs, variables in coding and step-by-step thinking in maths.

Worked example: 📋 A robot program runs: speed = 20 speed = speed + 10 speed = speed + 15 speed = speed − 5 What is the speed at the end? → 40

  1. Trace: 20 → 30 → 45 → 40.
  2. The speed at the end is 40.

Check: 20 + 10 + 15 − 5 = 40 ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 25 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 📋 State Tracker badge when you pass — and a certificate when you finish all 10 lessons of Part 3 · Programming robots. You can still take the test without signing in.

🖨️ Robotics Worksheet: Robot State

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 Robotics classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Electronics & IoT Circuits, sensors and microcontroller boards.