Edexcel 1CP2 6.1.4: Readable code
The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.
What it covers
Programs are read far more often than they are written: by you next week, by a teammate, by whoever fixes the robot later. Code that is easy to read and change is called maintainable. This lesson is about writing it.
- Comments
- What a good comment says
- Names that explain themselves
- Blank lines and indentation
- Turning a line off
Or do it in the simulator, with tasks that mark themselves
Lessons that teach it
- F1.5 Comments and readable code Programming basics
Comments, names, blank lines: code a person can read and change.
Try it on a robot
The task from F1.5 Comments and readable code, running here. Change the program and press Run.
Past paper questions on this
Real exam questions that test this, each worked through with a program you can run.
The specification is Edexcel's own document; this page says which of our lessons teach point 6.1.4 and is not endorsed by the board.