School preview · Teacher-led courses are in preview · Registration is open · Payments and live video are awaiting connection
← O Level ICT

O Level · English Medium · Pearson Edexcel · ICT

Programming and practical projects

Build a small program from requirements and improve it using tests.

Shared cross-level core and stretch unit. Start with the core questions, then use the stretch example for deeper work. The same unit is available in related class and board pathways; it is not a full grade-specific or examination-specification course. A teacher should select the appropriate depth and further topics.

Learn the idea

Separate the required behaviour from the implementation. A function can accept inputs and return an output; validation rejects unsupported input. Tests need independently determined expected results. A project also needs readable naming and a record of known limits. Never paste unknown code or secrets into a live console.

Worked example

Requirement: ticket_total(n) returns 30*n for whole-number n from 0 to 10; other inputs are rejected. Tests include 0→0, 3→90, 10→300 and 11→rejected. This is pseudocode, not a running payment system.

  1. Write the requirement and allowed inputs.
  2. Implement or trace one function.
  3. Test, diagnose and retest after a change.

Stretch example

A test double can stand in for an external service so a local test does not send real messages or take payment. Integration tests separately check whether the real components communicate correctly in an authorised test environment.

Your written practice

Show your working on paper and enter your answer here. If it does not match, compare the model and try again.

Show model answer and explanation

120

30 × 4 = 120.

Show model answer and explanation

rejected

It exceeds the allowed maximum 10.

Show model answer and explanation

0

Zero tickets cost zero in this model.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

IF n < 0 THEN return an error; otherwise continue validation.

Do not calculate a negative bill.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

That would repeat the same bug instead of checking the requirement independently.

Explain independence of the check.

Show model answer and explanation

no

A test double replaces the real service.

Write in your own words. A guardian or teacher should review this response.

Show model answer and explanation

Unit: check ticket_total(3)=90 locally. Integration: in an authorised sandbox, check the booking passes that amount to a test gateway.

Keep test environment and real transactions distinct.

Small tested project

Create a local quiz counter or its complete paper trace.

Review with a guardian or teacher

Keep your work on paper or in a local file. This page does not upload it or automatically grade the project.

Teacher-led lessons, schedules and prices for this outline are upcoming. You can use any starter practice above now without booking.

Your next step

Solo practice works without an account. Sign in to save a practice record to your learner profile.

Keep practising

Exact lesson links and related activities are labelled separately. Return-to-course links retain your selected learning path.

Browse all games and books →