Flowchart and algorithm worksheets to print

A4 computational thinking worksheets: trace a flowchart or pseudocode with a trace table, complete the missing step, find the bug, put the steps in order and draw the flowchart. Sequence, selection and loops, Grades 5 to 10, with an answer key.

What do you want to practise?

Teacher guide ↓

Teaching Guide: Flowcharts and Algorithms

Computational thinking can be learnt away from the computer: following an algorithm step by step, predicting what it will print, finding its bug and putting its instructions in order. These are the tasks of PISA 2025’s Learning in the Digital World and of the computing curriculum. This free generator makes flowchart and pseudocode worksheets with programs the generator runs, so every answer and trace table in the answer key is right.

For
Elementary 5th, 6th · Middle & High 7th, 8th, 9th, 10th (ages 10-15)
Subject
Technology › Computational Thinking
Includes
Student sheet and answer key
Format
A4, to print or save as PDF; new exercises every time
Price
Free, no sign-up
Available in
Catalan, Spanish, English
Flowchart and algorithm worksheets to print: sample printable A4 worksheet, first page of the student sheet Student worksheet
Flowchart and algorithm worksheets to print: sample answer key of the same worksheet, first page Answer key
Sample made with LearnKits. Every worksheet is new: choose the topic, level and amount and print it for free.

Trace the program

A trace table with the value of every variable after each step, and the output.

Complete

Three options for the missing step: only one gives the output.

Debug

The program prints the wrong thing: find the wrong step and fix it.

Order

Jumbled instructions that only give the output in one order.

Draw

From pseudocode to a flowchart, with the right flowchart in the answer key.

Flowchart or pseudocode

Every exercise prints as a flowchart or as pseudocode with English keywords.

Frequently asked questions about the flowchart worksheets

Which grades are they for?
Level 1 (sequence and selection) is for Grades 5-6, level 2 (loops) for Grades 7-8 and level 3 (loops with decisions, div and mod) for Grades 9-10.
What is a trace table?
A table with one row for every step that gives a variable a value or prints something. Filling it in is the surest way to know what a program does without a computer.
What do div and mod mean?
They are integer division: 17 div 5 = 3 is the quotient and 17 mod 5 = 2 the remainder. They tell whether a number is even (n mod 2 = 0) or split a number into its digits (n mod 10 and n div 10).
How do I know the answers are right?
The programs are not written by hand: the generator builds them as trees and runs them with an interpreter. In the bug exercises it checks that only one correction works, and in the ordering ones that only one order gives the output.
Which other worksheets go well with these?
Unplugged coding with the robot on a grid to start with, logical reasoning for sequences and patterns and algebraic expressions for variables. You will find every resource in technology worksheets.
How do I print only the answer key?
Click Print and choose “Answer key”, or “Worksheet and answer key” for both. You can also save it as a PDF from your browser’s print dialog.