top of page

COMPUTATIONAL THINKING | FLOWCHARTS

SECTION 1 | WHAT ARE FLOWCHARTS​​?

 

​Flowcharts are a diagram that represents a process. They trace the steps of the process and include decisions and branches that the process might take. They are frequently used in the design stage of a product and are a useful tool to document and represent how a process or algorithm should flow or work.

 

Flowcharts use different symbols to represent various actions, for example a diamond shape represents a decision in the process and will always have 2 possible outcomes which can be represented with YES or NO. whereas a parallelogram represents Data in flowchart. The image below shows many symbols that are used in flowcharts, however many of these are not used at GCSE, IB and A-level Computer Science. Commonly used symbols are discussed later.

 

SECTION 2 | CREATING FLOWCHARTS

 

Creating effective flowcharts is essential for conveying processes, algorithms, or workflows clearly and concisely. Here are some tips to help you create clear, readable, and effective flowcharts.

 

Start Simple: Begin with a basic idea or process before adding details. Understand the start and end points of your flowchart first.

 

Use Consistent Shapes: Familiarize yourself with standard flowchart symbols:

  • Ovals for "Start" and "End".

  • Rectangles for processes or actions.

  • Diamonds for decision-making points.

  • Parallelograms for inputs or outputs.

  • Always use these symbols consistently.

 

Maintain Flow Direction: Typically, flowcharts flow from top to bottom or left to right. Keep a consistent direction unless there's a compelling reason not to.

Avoid Overcrowding: Ensure your flowchart is clear and easy to read. If it becomes too detailed or complex, consider breaking it into multiple flowcharts or using a sub-process symbol.

Use Arrows Wisely: Arrows guide the viewer and indicate the direction of flow. Make sure they don’t cross over each other too often, as this can make the chart confusing.

Label Clearly: Every shape and decision point should have clear, concise text. Avoid using jargon unless it's widely understood by your target audience.

Test Your Flowchart: Walk through your flowchart as if you're following the process or algorithm it represents. This will help you catch any logical errors or missing steps.

Use Colors: Different colors can represent different types of actions or highlight particular pathways through the flowchart. But use them sparingly and consistently!

Get Feedback: Sometimes you're too close to a project to see errors or ambiguities. Having another set of eyes review your flowchart can be invaluable.

 

SECTION 3 | TRACING FLOWCHARTS

 

A trace table, sometimes called a dry run table, is a technique used to test algorithms for correctness and understand their behavior. It's essentially a table that keeps track of the changes in variable values as you progress through an algorithm or flowchart step by step.

 

HOW TO CREATE A TRACE TABLE

Initialize Columns for Variables

  • Create a column for each variable and each output used in your flowchart or algorithm.

  • You might also want a column for the process or action name, so you know which step you're recording.

 

Starting Values

  • At the start of your trace, initialize the variables with their starting values on the first row of your table.

 

Process Each Step

  • For each step in the flowchart or algorithm, update the values in your trace table to show any changes that occurred.

 

Keep Track of Loops

  • If there's a loop in your flowchart or algorithm, ensure that each iteration of the loop has its row(s) in the trace table.

 

WHEN TO DROP TO THE NEXT ROW IN YOUR TRACE TABLE

 

When tracing an algorithm or flowchart using a trace table it can be confusing when to drop to a new row in your trace table, you generally drop down to a new line in the table under the following circumstances:

 

New Iteration or Step

  • Each time you progress to a new step or action in your algorithm or flowchart, you start a new line. This helps in mapping each step to its corresponding effect on the variables.

 

Loop Iteration

  • When your algorithm or flowchart contains a loop (like a "for" or "while" loop), you start a new line for each iteration of the loop. This is crucial to track how variable values change with every pass of the loop.

 

Decision Branching

  • When you encounter a decision point (usually a conditional like "if" or "else"), and you take a branch based on a condition, you might opt to use a new line to indicate the branch you've taken, especially if different branches affect variables differently.

 

Function or Procedure Calls

  • If your flowchart or algorithm involves calling a function or procedure, every time the function is called, you might start a new line, especially if it impacts the variables you're tracing.

 

Revisiting a Previous Step

  • If, for any reason, you're going back to a previous step or action in your algorithm or flowchart (not including regular loop iterations), this might warrant a new line in the trace table.

 

Changes in Variables

  • If any variable changes its value, even if you're in the same step, you should consider dropping to the next line to clearly represent the state change.

 

Special Events or Errors

  • If you encounter an unusual event, an error, or an exception while tracing, it's a good idea to record this on a new line with a clear note about what occurred.

 

Remember, the primary goal of the trace table is clarity. When in doubt, it is generally a good idea to start a new line in the trace table to ensure each step or change is clearly documented and do not be afraid to make comments for the examiner to see your logic, they should be marking from a correct solution.

 

SECTION 4 | EXAMPLE EXAMINATION STYLE QUESTION

 

At IB level the specification states that you will not be required to draw a flowchart, but understanding and tracing them is something that frequently comes up in examination papers.

Teacher don't teach me nonsense  

                                       

                     - Fela Kuti

bottom of page