Sequence

    AQA
    GCSE

    Sequence is the fundamental control structure in imperative programming whereby instructions are executed strictly in the order they appear, from top to bottom. Candidates must demonstrate understanding that the program counter advances line-by-line, and that the state of variables is determined by the precise chronological order of assignments and operations. Mastery of sequence is a prerequisite for analyzing flow control; examiners require candidates to accurately trace variable state changes through sequential steps before introducing selection or iteration. This concept underpins the Fetch-Decode-Execute cycle and is assessed through both code writing (AO2) and dry-run tracing (AO2).

    0
    Objectives
    3
    Exam Tips
    3
    Pitfalls
    4
    Key Terms
    4
    Mark Points

    What You Need to Demonstrate

    Key skills and knowledge for this topic

    • Award 1 mark for correctly identifying the final value of a variable after a sequence of assignment operations
    • Credit responses that place input statements logically before processing or output statements in pseudocode
    • Award 1 mark for completing a trace table row-by-row, showing the state of variables at each specific line of execution
    • Credit the correction of logic errors where a calculation attempts to use a variable before it has been initialized or assigned a value

    Marking Points

    Key points examiners look for in your answers

    • Award 1 mark for correctly identifying the final value of a variable after a sequence of assignment operations
    • Credit responses that place input statements logically before processing or output statements in pseudocode
    • Award 1 mark for completing a trace table row-by-row, showing the state of variables at each specific line of execution
    • Credit the correction of logic errors where a calculation attempts to use a variable before it has been initialized or assigned a value

    Examiner Tips

    Expert advice for maximising your marks

    • 💡When completing trace tables, use a ruler to follow the code line-by-line; never guess the value based on what you think the program 'should' do
    • 💡In 'write an algorithm' questions, ensure you declare or input variables before using them in calculations—order matters implicitly
    • 💡Check for 'logic errors' in code correction questions by verifying that dependencies (e.g., total = a + b) appear after the constituent parts are defined

    Common Mistakes

    Pitfalls to avoid in your exam answers

    • Updating multiple variables in a single row of a trace table when the code executes assignments on separate lines
    • Assuming a variable holds a value based on the problem context rather than the strict execution of the previous code line
    • Writing algorithms where calculations are performed on variables before the user has input the necessary data

    Study Guide Available

    Comprehensive revision notes & examples

    Key Terminology

    Essential terms to know

    Likely Command Words

    How questions on this topic are typically asked

    Trace
    Complete
    Write
    Explain
    Correct

    Practical Links

    Related required practicals

    • {"code":"Programming Project","title":"Implementation Phase","relevance":"Structuring code blocks sequentially to ensure correct data flow and variable initialization."}

    Ready to test yourself?

    Practice questions tailored to this topic