Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Paper 2/Testing

Refining algorithms

2.3.2 Testing

Practise exam questions

Testing — Note 5 of 5

Ability to correct an algorithm based upon identifying syntax or logic errors.

What you need to know

Refining an algorithm means improving it after it has been designed and tested. This could involve fixing bugs found during testing, adding new functionality, improving efficiency by removing unnecessary steps, or making the code more readable. Refining is an ongoing process throughout the software development cycle.

What to know

  • Refining means improving an algorithm or program after initial development and testing.
  • Common refinements: fixing bugs, improving efficiency, adding functionality.
  • Removing unnecessary/repeated code makes programs more efficient.
  • Improving variable names and adding comments improves readability.
  • Refining is driven by the results of testing: fix issues found with test data.
  • You may be asked to identify improvements or correct errors in a given algorithm.

Exam technique

  • Tip:Refining to use a function means replacing inline code with a function call: totalPay = calculatePay(experience, miles).
  • Tip:When asked to 'refine' a program with errors, you must fix ALL syntax AND logic errors. Check: correct operators (AND not OR), correct comparisons (<=, not =<), string delimiters on print strings, output messages in the right position.
  • Example:Replacing 5 repeated lines (total = total + minsPlayed[2,0] ... minsPlayed[2,4]) with a FOR loop: for x = 0 to 4: total = total + minsPlayed[2, x] — more efficient and maintainable.

Ready to test yourself?

Practise 2.3.2 questions
← Previous noteNormal; Boundary; Invalid/Erroneous2.3.2 TestingNext topic →AND, OR and NOT2.4.1 Boolean Logic

Back to Testing

Revise another OCR GCSE topic: Defensive Design

Testing

Note 5 of 5

  1. 1Testing
  2. 2Iterative, Final/terminal
  3. 3Syntax and logic errors
  4. 4Normal; Boundary; Invalid/Erroneous
  5. 5Refining algorithms
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Privacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).