Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/02 Algorithms and programming/Thinking Logically/Determine how decisions affect flow through…

Determine how decisions affect flow through a program

Determine how decisions affect flow through a program.

2.1.4 Thinking Logically

Thinking Logically — Note 3 of 3

Candidates need to understand that there can be many different routes through a program, and how decisions influence these routes and outcomes.

What you need to know

Decisions determine which route the program takes through its code. You need to understand how different inputs lead to different paths and outcomes.

What to know

  • Each decision splits the flow of a program into different routes, and loops repeat sections of code depending on a condition.
  • The number of possible routes through a program grows quickly as decisions are added.
  • Tracing a program with different test data shows which path is followed and helps find logic errors.
  • Nested decisions (decisions inside decisions) create more complex flows and need careful testing.

Exam technique

  • Tip:When asked how a decision affects flow, describe what happens for each outcome of the condition.
← Previous noteDetermine the logical conditions that affect the outcome of a decision2.1.4 Thinking LogicallyNext topic →Determine the parts of a problem that can be tackled at the same time2.1.5 Thinking Concurrently

Back to Thinking Logically

Thinking Logically

Note 3 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