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.

5 of 5 still to sort.

A giveaway program that runs without errors. Does it do everything it was meant to do?

Watch out: Running without errors tells you nothing yet about whether each requirement is met.

Same feature, two evaluations

Weak evaluationvsStrong evaluation

Read across each row: what does the strong version add?

Focus

What works

Weak evaluation

The giveaway works.

Strong evaluation

The giveaway time is chosen within the total stream duration.

The insight

Name the exact part that works. 'It works' on its own is only a claim.

How it was achieved

Weak evaluation

Not mentioned.

Strong evaluation

The program uses random.randint to select the time.

How it was tested

Weak evaluation

Not mentioned.

Strong evaluation

A 30-minute stream produced values in the correct range every time.

Area for improvement

Weak evaluation

The game name part needs fixing.

Strong evaluation

The program accepts an empty string as a game name, so invalid data gets in. Add a check that rejects an empty name and asks again, so the announcement always has a real name.

Computer Science · Fit for purpose

So... is it finished?

Maya's giveaway program runs from top to bottom without one error message. She says, 'Great, that's it done.'

Which idea is closest to what you think evaluating Maya's program involves?
How sure are you?

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 loop
2 stream_minutes = 30
3 for giveaway in range(3):
4 stream_seconds = stream_minutes * 60
5 print('Giveaway', giveaway + 1, 'within', stream_seconds, 's')
6 # VERSION B: convert once, before the loop
7 stream_minutes = 30
8 stream_seconds = stream_minutes * 60
9 for giveaway in range(3):
10 print('Giveaway', giveaway + 1, 'within', stream_seconds, 's')
giveawaystream_secondsconversions so far
--0

Output

 

Step 1: Version A starts. Nothing converted yet.

1 / 12

Watch the 'conversions so far' column in each version.

Step 1 of 12: Version A starts. Nothing converted yet..

Watch out: Both versions print exactly the same three lines. The difference is the work done to get them.

Computer Science · Subprograms

Write it once, call it often

A giveaway program prints the same two lines to announce a winner, pasted in three places. Refine it: write those lines once as a subprogram, then replace each copy with a call.

  1. def announce_winner(name, prize):Define the subprogram once. The parameters hold the parts that change.
  2. missing step
Which line is step 2?

Computer Science · Your turn

Write an evaluation

Requirements: ask for the player's name, ask five questions, show the final score. How it works: the program adds 1 to a score each time an answer is right. Testing: a player who got 3 of the 5 questions right was shown 'Score: 3'. A player who pressed Enter without typing a name was welcomed with 'Welcome, !'.

Write one strength and one area for improvement for this quiz program. Make each one specific and evidence-based. [5 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1Judge each functional requirement separately as met, partially met or not met, and back each judgement with evidence from testing.
2A program that runs without errors can still only partly meet its requirements. Running is one strength, not the verdict.
3Specific beats vague: say what works, how it was achieved and how it was tested. For an improvement, say what should change and why.
4Reviewing code checks how well it works, how readable it is and whether it meets the requirements. Improving it may mean simplifying logic, using subprograms or correcting errors.

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?
To look back at what has been created and judge how well it meets its goals and functional requirements, then suggest ways to improve it.
What is a functional requirement?
Something the program must do, such as accepting a game name, selecting a giveaway time or showing readable output.
What is a rubric in evaluation?
A checklist built from the functional requirements (inputs, processes and outputs) used to record how well each is achieved.
Which three judgements can a rubric record for a requirement?
Met, partially met or not met.
What makes an evaluation statement evidence-based?
It says what works, how it was achieved and how it was tested, instead of only saying 'it works'.
Name strengths to look for in a program.
Runs without errors and meets requirements, clear consistent formatting (naming, indentation), efficient logic, and a good user experience.
What is limited input validation?
A program letting invalid data through, such as accepting an empty string as a game name.
What two things make code hard to maintain?
Few comments and poor variable names.
What should every area for improvement include?
What should change, and why.
How can moving a conversion earlier improve a program?
The conversion is done once, so there are fewer repeated calculations.
What is a subprogram?
Code written once and called whenever it is needed, which avoids writing the same code over and over.
What is modularity?
Breaking large sections of code into subprograms, which makes it easier to read, test and maintain.
What does reviewing code check?
How well it works, how readable it is and whether it meets the functional requirements.
Name three ways to improve code during a review.
Simplify the logic, break large sections into subprograms, or correct errors.

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 posted

More Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

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.