Using picture books to teach computational thinking

Popular culture may lead you to believe we need to teach all students to code.

Actually... we need to teach all students how to use computational thinking. Coding is just one application of computational thinking. Other applications include robotics and digital technologies.

There are four components of computational thinking (BBC website)
  • decomposition - breaking down a complex problem or system into smaller, more manageable parts
  • pattern recognition – looking for similarities among and within problems
  • abstraction – focusing on the important information only, ignoring irrelevant detail
  • algorithms - developing a step-by-step solution to the problem, or the rules to follow to solve the problem
Based on the definition above you do not always need technology to teach computational thinking. It is possible to teach computational thinking offline and using picture books is just one way.

Teaching with picture books is one way for teachers with limited technology skills to teach computational thinking. The skills below and more may be integrated into literacy programs as an additional layer when interpreting texts and meaning.


Stories with a journey can be used to create physical maps and interpret the story into a physical illustration of the story. This is often done for us in adult fiction where maps are included to illustrate the location of events in a book. It is possible for students to create their own map based on what they have read.

Sail away: The Ballad of Skip and Nell by Mem Fox 
Possum Magic by Mem Fox

Repeating phrases

Stories with repeating phrases can be used at different levels of understanding to illustrate variables and if statements. Two examples have been included below.

Stories with repeating phrases can be rewritten in a shortened format where parts are declared as variables and called or for younger children they could group phrases and write the story using colours.

If Statements
Stories with repeating phrases could also be used to illustrate If ... Then ... Else statements. Pam Adams book "There was an old lady who swallowed a fly" is an example of an if statement. If there is another animal that is larger then eat it, else... stop eating.

Mysteries and problem solving

Solving problems and thinking through codes and puzzles is part of computational thinking. Graeme base has many books that include codes and puzzles. 

Eleventh Hour by Graeme Base
The Eleventh Hour is a mystery story that can be solved using the clues in the book. Scattered through out the story are clues written in various types of code, morse code, hieroglyphics, hidden messages. Each of the codes give pieces of information to solve the mystery of who stole the food. In newer copies of the book the solution is printed in the back of the book on coloured paper. In older copies of the book it was included in an envelope.
Other books with puzzles and codes by Graeme Base include
  • Enigma
  • The Jewel Fish of Karnak
  • The Golden Snail

I have written about computational thinking before, previous posts are listed: