Join a lesson Start a lesson
CodingMain

Find the bug

Code that gives the wrong answer. A free lesson starter for Lesson Screen: change anything, then teach it live with your class.

Try it first needs no account.

Find the bug on the Lesson Screen board

How to run it in class

10 min
  1. 1Run itIt should print 6. What does it print?
  2. 2Find the lineCircle the line to change.
  3. 3Fix and runFix it and check it prints 6.

Good for

DebuggingAny level

Works well with

Subject toolsEvery student's own board

Why it works

Finding a bug in short code teaches debugging, a skill every coder needs. Circling the line first makes students think before they change anything.

Ideas to adapt it

  • Add two bugs for a challenge.
  • Let students add a bug for a partner to find.
  • Use a bug from a real student's code.

Questions

How long does it take?

About 10 minutes. It stays saved in your lesson, so you can come back to it next time.

Can I use it with one student?

Yes. Hide a bug in their own code for them to find.

Do students need an account?

No. Go live and share the link or the code. Students join from any device with nothing to install, and you can give each of them their own copy.

Is this starter free?

Yes. Open it, change anything and teach with it on the free plan, which has every feature and live lessons with up to 5 students. Try it first needs no account.

More coding starters

See all