Signed up recently but had issues with the confirmation email?

Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.

Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.

Revision notesQuestionsFor schools
Revise Computing
Log inStart revising free
Revision notesQuestionsFor schoolsLog in

© 2026 Revise Computing · revisecomputing.co.uk

Worried about something?Question Bank UpdatesPrivacy noticeTermsContact

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

Knowledge/A Level/H446/02 Algorithms and programming/Thinking Logically/Determine the logical conditions that affect…

Determine the logical conditions that affect the outcome of a decision

Determine the logical conditions that affect the outcome of a decision.

2.1.4 Thinking Logically

Practise exam questions

Thinking Logically — Note 2 of 3

Candidates need to understand what these decisions are and the logical conditions that determine their outcome.

What you need to know

Each decision depends on a logical condition that evaluates to true or false. You need to write these conditions precisely, using comparison and Boolean operators.

What to know

  • Conditions use comparison operators (==, !=, <, <=, >, >=) and Boolean operators (AND, OR, NOT).
  • Check boundary values carefully: < and <= give different results at the boundary.
  • Complex conditions can be combined, with brackets to make the order clear.
  • The comparison decides a sort's order: swapping when items[i] > items[i+1] gives ascending order; changing > to < gives descending order. If asked to change the order, give the line number and the rewritten comparison.

Code examples

Logical conditions in OCR pseudocode
text
if age >= 13 AND age <= 19 then
    category = "Teen"
elseif age < 13 then
    category = "Child"
else
    category = "Adult"
endif

Exam technique

  • Mistake:Writing if x > 5 AND < 10. The variable must be repeated: if x > 5 AND x < 10.
  • Mistake:Using OR when AND is needed. if mark < 0 OR mark > 100 checks for INVALID input; if mark >= 0 AND mark <= 100 checks for VALID input. 'Either' needs OR: half price for under-16s or over-65s is age < 16 OR age > 65. To skip several values, join != tests with AND: if i != 4 OR i != 7 is always true, because every i differs from at least one of them.
  • Tip:Test your condition with a value just inside, exactly on, and just outside each boundary.
  • Tip:When describing a decision, give the result of every outcome: what is returned or done when each condition is True, and when none is. Any sensible return values (True/False, 1/0) are accepted.

Past exam questions

  • June 2022Paper 2Q6(b)(ii)3marks

Ready to test yourself?

Practise 2.1.4 questions
← Previous noteIdentify the points in a solution where a decision has to be taken2.1.4 Thinking LogicallyNext note →Determine how decisions affect flow through a program2.1.4 Thinking Logically

Back to Thinking Logically

Thinking Logically

Note 2 of 3

  1. 1Identify the points in a solution where a decision has to be taken
  2. 2Determine the logical conditions that affect the outcome of a decision
  3. 3Determine how decisions affect flow through a program
Topic overview