Skip to topic
    ← Back to course topics

    Thinking logically — OCR A-Level Computer Science

    Thinking logically explained

    Thinking logically covers 3 specification points, including (a) Identify the points in a solution where a… and (b) Determine the logical conditions that….

    Read the full explanation

    Open a point below for its explanation and revision guidance.

    (a) Identify the points in a solution where a decision has to be taken.

    A decision point is a place in a solution where the flow of control splits into two or more routes, so the program must choose which instructions to run next. In pseudocode these appear as IF, ELSE and CASE statements; in flowcharts, as diamond-shaped symbols. To identify them, trace the solution step by step and ask whether the next action depends on a test. For example, in a login routine that reads a password and then checks whether it matches the stored value, the comparison and the IF that follows form a decision point. Reading the password or printing a message does not, because every run follows the same path. Loop conditions that decide whether to repeat also count.

    (b) Determine the logical conditions that affect the outcome of a decision.

    A logical condition is a test that evaluates to TRUE or FALSE and so decides which route an algorithm takes at a decision point. To determine the conditions that affect an outcome, start from the result you need, such as a discount being applied, and work backwards to list every test that can change it. Tests combine with AND, OR and NOT. For example, a discount applies if age ≥ 65 OR member = TRUE, but only when total > 20 AND the item is not on sale. An AND needs both parts true, an OR needs at least one, and NOT reverses a value. Test a boundary value such as total = 20 to confirm which comparison operator is used, because a wrong operator changes the outcome.

    (c) Determine how decisions affect flow through a program.

    This criterion asks you to determine how decisions change the route a program takes when it runs. A decision evaluates a condition that returns true or false, then follows one branch or the other. Selection structures such as IF, ELSE IF, ELSE and CASE carry out this choice. To determine the effect, identify the condition, state which branch runs when it is true and which when it is false, then follow the variable values through the code. For example, in IF score >= 50 THEN result = "Pass" ELSE result = "Fail" END IF, a score of 62 sends flow to the Pass assignment and skips the Fail assignment. Nested decisions compound the effect, so trace each path in order before choosing an answer.

    Your focus

    1. Identify each decision point in a given pseudocode algorithm.
    2. Distinguish a branching decision from a sequential instruction.
    3. Explain in one sentence why a named decision point splits the flow of control.
    Show all 9 objectives
    1. Determine the conditions that decide a given outcome in an algorithm.
    2. Apply AND, OR and NOT correctly to combined conditions.
    3. Test a boundary value to confirm which comparison operator produces the outcome.
    4. Trace the execution path of a program containing IF, ELSE IF and ELSE statements for given input values.
    5. Identify which statements are executed and which are skipped for a given condition result.
    6. Explain how nested decisions change the order and set of statements that run.

    Thinking logically exam tips

    Marking Points
    • Locates every IF, ELSE, CASE or diamond-shaped decision symbol in the algorithm.
    • Identifies the point where the flow of control branches, not merely a line that contains a comparison.
    • Names where each decision sits in the solution, such as directly after a password comparison.
    • Excludes sequential assignments, input and output that do not change the route taken.
    • Includes loop conditions that determine whether the loop repeats.
    • Traces the whole solution so that no decision point inside a nested structure is missed.
    • Identifies each test whose TRUE or FALSE result changes the route taken to the outcome.
    • Names the variable or input each condition uses, such as age or total.
    • Represents combined tests with AND, OR and NOT using the correct logic for each.
    • Excludes variables and tests that have no effect on the chosen outcome.
    • Checks boundary values to confirm the comparison operator is correct, such as > versus ≥.
    • Traces each condition back to the outcome it affects, so the logic is complete.
    • Identifies the condition being evaluated and what happens when it is true and when it is false.
    • Follows the variable values through the code to decide which branch actually executes.
    • States that only one branch of a selection runs for a given set of data.
    • Traces nested decisions in order so that the final path through the program is correct.
    • Identifies the statements that are skipped as well as those that run.
    Examiner Tips
    • 💡Trace the algorithm with one sample input and mark each IF or CASE you reach.
    • 💡Check each comparison by asking whether two different next instructions could follow it.
    • 💡Look for keywords such as IF and CASE, or a diamond symbol, then confirm that each one splits the flow.
    • 💡Start from the outcome named in the question and trace backwards to the tests that lead to it.
    • 💡Write each condition as TRUE or FALSE and test it with two sample inputs, one that passes and one that fails.
    • 💡Check each operator at its boundary; for example, decide whether total = 20 satisfies total > 20.
    • 💡Write down the value of each variable before reading the options so that you can test each one.
    • 💡Eliminate options that describe a branch whose condition is false for the given data.
    • 💡Check boundary values, such as exactly 50 in a >= test, before choosing an answer.
    Common Mistakes
    • Treats every line containing a comparison as a decision; a point counts only when it changes which instruction runs next.
    • Lists assignments and output as decision points; count only the places where the route splits.
    • Omits decisions nested inside loops or other selections; trace every branch of the solution to find them.
    • Lists every variable in the algorithm as a condition; include only the tests that influence the chosen outcome.
    • Confuses AND with OR, so a result needing both tests is treated as needing only one; use AND only when both parts must be true.
    • Ignores the effect of NOT, so a negated test is read as its original value; apply NOT by reversing the result.
    • Selects a branch that appears in the code but is never reached for the given values; trace the values to find the branch that runs.
    • Treats an ELSE branch as running when the condition is true; the ELSE runs only when the condition is false.
    • Ignores the boundary value in a condition such as > is related to the stated quantity , so the wrong branch is chosen; check whether the boundary value belongs to the true branch.