Exploring and editing code
to continue. (After that any entries made into the worksheet will be automatically saved, and you can re-load the partially-completed worksheet in future – at which point you will be asked to auto-save it again).

Preliminaries

1. Loading and running a program

2. Reading code

3. Selecting instructions

4. Deleting or moving instructions

5. Editing instructions

So far the changes we have made involved moving or deleting a whole instruction. When you start to write programs from scratch (in the next worksheet) you will find that you sometimes need this ability. However, more commonly you will need to edit code within an instruction, so we'll do that now.

6. Inserting new instructions

We are now going to insert a new instruction to make an audible noise when a bubble bursts.

Congratulations! You have finished the worksheet, and you now know enough about navigating and editing code to start writing your first program – with the help of another Worksheet. Meantime, click Help > Home > IDE Reference > Code editor – for a handy summary of all the above operations, and a few more that you can also try out here.

This worksheet is copyright © Richard Pawson 2025, and protected by the Creative Commons license: Attribution-NonCommercial-NoDerivatives 4.0 International. If you copy and modify this worksheet you may not distribute your modified version (outside your own teaching institution) without the author's permission. Please email the author to report errors or suggest improvements.