GCSE · Computer Science · Eduqas · Spec C500QS
Compilation and interpretation of code
Imagine leaving your editor, opening another program, translating your code, then hunting for the output, every time you change one line. Now imagine one button.
Computer Science · Development environments
Press Run. Read. Fix. Run again.
This program should print the total cost of 3 items that cost £4 each. Press Run, read what comes back in the same window, then choose a fix for the flagged line. Keep going until the output is what you expected.
- price = 4
- quantity = 3
- total = price + quantity
- print("Total cost:", total
The messages and outputs are what Python 3.13 gives for this exact code. The program is just an example.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How pressing Run inside your editor lets you test little and often
What you need to know
- A development environment (an IDE is one kind) brings together, in one program, the tools you use to write, translate and run code.
- Compilation and interpretation of code is one of the software tools a development environment provides.
- From within the environment you can translate your source code into a form the computer can execute, then run it, typically with a single command such as a Run button.
Have a goMaya says, 'Run just makes the computer do exactly what I typed.' Using what you have read so far, what is missing from her idea?
The code is translated into a form the computer can execute before it is run.
Source code cannot be executed as typed. Translating comes first, and the environment typically does both with one command.
- The environment may compile your program (translate the whole thing before it runs) or interpret it (translate and run it one statement at a time).
Have a goAn environment translates statement 1 and runs it, then translates statement 2 and runs it, and so on. Is that compiling or interpreting?
Interpreting.
Compiling would translate the whole program before running any of it. Interpreting takes translating and running one statement at a time.
- Translating and running happen inside the environment, so you do not leave the editor or use a separate translator. That saves time.
- The output appears inside the environment too, so you can compare what the program does with what it was expected to do.
- Running straight away gives you a quick write-run-check-edit cycle: make a change, run again immediately, see the effect.
Have a goYou have just changed one line of your program. Following the quick cycle, what do you do before you change anything else?
Run it again straight away and check the output.
The cycle only works if you run after the change, not after piling up more edits, so you see the effect of that one change.
- That lets you test often and in small steps while you write, not only when the program is finished, so problems are found sooner.
The big picture
A development environment lets a programmer translate their code, by compiling or interpreting it, and run it from the same place, usually with one Run command. The output appears there too, so the programmer can test often and in small steps and find problems sooner.
Key points
Worked example
Problem
Lena is writing a program that adds up three test scores (12, 15 and 18) and prints their average. She is using a development environment with a Run button. How can she write and test it so that any problem is easy to find?
⚠ Watch out
Writing only 'it saves time' and stopping there. Say what saves it: translating and running happen inside the environment, so you do not leave the editor or use a separate translator.
Memory hook
Write, Run, Check, Edit, and never leave the editor. Little and often beats big and late.
Check yourself
Cover the page and explain what Run does to your code, where the output appears, and why that lets you test in small steps.
Flashcards
(10)What does a development environment (such as an IDE) bring together?
How is code usually translated and run from inside a development environment?
What is compiling?
What is interpreting?
Is pressing Run just running your code as you typed it?
Why does translating inside the environment save time?
Where does the program's output appear, and why is that useful?
What is the write-run-check-edit cycle?
When should you test a program you are writing?
Which kind of tool in a development environment does the translating?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 15 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.