Book a free demo

๐Ÿ’ป Coding games ยท free, no sign-up

Code builder: put the lines in order.

Play Code Builder

Loading Code Builderโ€ฆ

Reading code is easier than writing it from nothing. Here the lines are given and you decide the order. Press Run and the program really runs.

ShareWhatsApp

How to play Code Builder

  1. Choose a level and read the goal: what the program should print.
  2. Tap lines from the pile to build the program, top to bottom. Tap a placed line to take it back.
  3. Press Run. A program that prints the goal first time scores 30 points.
  4. If it fails, read what it printed and try a different order.

Tips and strategy

  • A variable must be set before a line uses it: put the starting values first.
  • A line ending in a colon (for, if, def, while) is followed by indented lines that belong to it.
  • A function must be defined before you call it.
  • Say the program aloud in order: set up, repeat or decide, then print the result.

Keep playing

More games you might like

All 116 games โ†’

FAQ

Code Builder: questions

What is a Parsons problem?

A puzzle where the lines of a correct program are given in a mixed-up order and you put them back. It practises how code flows without needing to type.

Does the order of lines matter in Python?

Yes. Python runs lines from top to bottom, so a variable must be set before it is used and a function must be defined before it is called.

Why are some lines indented?

Indented lines belong to the line above, such as the body of a for loop, an if statement or a function. In Python the indent is part of the code.

Do I need to know Python already?

A little helps, but the goal line tells you what the program should print, which is enough to work out the order.

Start a conversation

Questions about classes?

A parent or guardian can share the learner's age, level and goals, and we'll suggest a starting point and confirm the format before anything is booked.

  • Tell us the learnerโ€™s age or grade and goals
  • Weโ€™ll suggest a suitable class or learning path
  • Weโ€™ll confirm format, timing and fees with a parent or guardian

For a childโ€™s class, please have a parent or guardian send the enquiry. Avoid sharing passwords or sensitive personal details.

Weโ€™ll use your details only to respond to this request.

Chat on WhatsApp
Esc

Try