GCSE · Computer Science · Edexcel · Spec 1CP2
Evaluating program fitness and efficiency
Your program runs. No errors, no crashes. So it's finished... or is it? Here's a program that looks fine, and a checklist that says otherwise.
Computer Science · Evaluating
Judge every requirement
Read the test evidence for each requirement, then decide: met, partially met or not met?
Still to sort
Met (0)
Everything the requirement asks for happens.
Where the line is: Testing shows it working. Nothing is missing, broken or unclear.
Partially met (0)
Some of it works, but something is missing, broken or unclear.
Where the line is: Not 'met' because a gap remains. Not 'not met' because part of the requirement does happen.
Not met (0)
What the requirement asks for does not happen.
Where the line is: The behaviour the requirement describes is absent, even if the rest of the program runs.
A giveaway program that runs without errors. Does it do everything it was meant to do?
Computer Science · Efficiency
Same output, less repeated work
Step through both versions and watch the 'conversions so far' column.
Before you step: how many times is stream_minutes * 60 worked out in Version A, and how many in Version B?
1 # VERSION A: convert inside the loop2 stream_minutes = 303 for giveaway in range(3):4 stream_seconds = stream_minutes * 605 print('Giveaway', giveaway + 1, 'within', stream_seconds, 's')6 # VERSION B: convert once, before the loop7 stream_minutes = 308 stream_seconds = stream_minutes * 609 for giveaway in range(3):10 print('Giveaway', giveaway + 1, 'within', stream_seconds, 's')
| giveaway | stream_seconds | conversions so far |
|---|---|---|
| - | - | 0 |
Output
Step 1: Version A starts. Nothing converted yet.
Watch the 'conversions so far' column in each version.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
'It runs' isn't a verdict. Judge a program against what it was meant to do.
What you need to know
- To evaluate a program is to look back and judge how well it meets its goals and functional requirements.
- Check each part against the plan, find anything missing, broken or off-brief, and suggest improvements.
- A rubric is a checklist built from the functional requirements, covering inputs, processes and outputs.
Have a goA requirement says 'ask the player for their name'. In a rubric, is that an input, a process or an output?
An input.
The player gives the information to the program, and a rubric covers inputs, processes and outputs.
- For each requirement, record whether it is met, partially met or not met.
- A strong evaluation says what works, how it was achieved and how it was tested.
Have a goBen's whole evaluation of his giveaway code is: 'It works. 10/10.' Which two parts of a strong evaluation has he skipped?
How it was achieved, and how it was tested.
'It works' is only a claim. A strong evaluation backs it with how the code does it and what testing showed.
- Strengths to look for: no errors, requirements met, clear consistent formatting, efficient logic and a good user experience.
- Areas for improvement include limited input validation, unclear output, hard-to-maintain code and poor handling of unexpected situations.
- Each area for improvement should say what should change and why.
- Cut unnecessary repetition by moving a conversion earlier, or by writing repeated code once as a subprogram.
- Breaking large sections of code into subprograms is modularity: it makes code easier to read, test and maintain.
Have a goA bug is found in code pasted in three places, versus one subprogram called three times. Which is quicker to put right, and why?
The subprogram: fix it once, in one place.
Code written once has one place to change, which is part of why modular code is easier to maintain.
The big picture
Evaluating a program means judging how well it meets its goals and functional requirements, using a rubric and test evidence rather than just saying it works. A strong evaluation names specific strengths and areas for improvement, and efficiency improves when unnecessary repetition is removed, for example with a subprogram.
Key points
Worked example
Problem
A basket program must print the total price of the items to two decimal places. Test 1: items 2.50 and 1.25 printed 3.75. Test 2: items 1.50 and 1.50 printed 3.0. Judge this requirement and write the evaluation.
⚠ Watch out
Thinking that a program that runs without errors is finished, or that evaluating just means saying whether it works. A program can run and still only partly meet its requirements.
Memory hook
Judge it, prove it, improve it: judge each requirement, prove it with test evidence, improve what's weak, and write repeated code only once.
Check yourself
Think of a program you have written or seen. Name one requirement it fully meets and one it only partly meets, and say what evidence shows each.
Flashcards
(14)What does it mean to evaluate a program?
What is a functional requirement?
What is a rubric in evaluation?
Which three judgements can a rubric record for a requirement?
What makes an evaluation statement evidence-based?
Name strengths to look for in a program.
What is limited input validation?
What two things make code hard to maintain?
What should every area for improvement include?
How can moving a conversion earlier improve a program?
What is a subprogram?
What is modularity?
What does reviewing code check?
Name three ways to improve code during a review.
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 Edexcel GCSE Computer Science topics
- Built-in and user-devised subprograms
- Code readability techniques
- Converting algorithms to programs
- CSV file I/O
- Decomposition and abstraction in programming
- Functions vs procedures
- Global vs local variables
- Identifying and correcting program errors
- Primitive data types
- Programming – condition-controlled repetition
- Programming – count-controlled repetition
- Programming – iteration over data structures
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)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 21 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.