Technique – Expression TRACS

Summary of Technique

Office mix

TRACS for expressions is a technique for analysing the expressions in code. This could be as simple as the expression 4+5, to a complex expression such as (INT(RND*23)+1)>ROUND(a,3) OR b<j*r.

The approach uses annotation to outline the order of evaluation of an expression. Each exercise uses the order, named PICCLES, to make this easy to follow through correctly.

Exercise(s) for Teachers

You can find a collection of all TRACS exercises (TRACS for expressions and TRACS for imperative programming) here.

Ways of Using the Technique in the Classroom

You should use simple examples early on in the course including the use of basic comparison operators and mathematical operators.  The document is not designed to be worked through in one go: it should be used appropriately throughout the course to introduce key concepts.

Understanding and working through expressions is a necessary skill from National 4 to Advanced Higher.

As the year progresses and your pupils’ knowledge increases, you can begin to include some of the more complicated concepts. The TRACS for expressions technique covers parenthesis, calculation, comparison and logical operators.

Benefits for Learners

“This technique is a simple and effective way to get pupils to think carefully about code. Pupils often face the issue of believing that they understand a piece of code but, when pressed on the details, cannot explain the functionality of each line. In a similar way to the peer instruction approach, the use of alternative conceptions and other code highlighting and comprehension techniques, pupils must spend time realising the complexity of code so that they have a full understanding of what they are trying to do when programming.”

Mr P Liddle, Bearsden Academy


“This technique has really improved my pupils’ ability to understand which parts of the equation come before others. Some of my pupils really struggled with this concept but working through these examples improved their mathematical skills and their understanding of the order of operations. Improving their skills in this area has improved their overall Computational Thinking skills.”

Mr C Henderson, Arbroath Academy, Angus Council


Tips for Creating New Exercises

  • Keep it simple – as with TRACS for imperative code, examples of code can become complicated very quickly. It is important to start with simple examples and build up from there. Complex expressions can occur in simple three-line programs. The code example does not have to be part of a large and complex program.
  • Work through example prior to giving material to pupils. In a similar way to the worked examples approach, talking pupils through the stages of thinking that go with evaluating expressions will help provide them with understanding of how you carry out this action.
  • It may be useful to use a blank TRACS for expressions document – this makes sure that pupils can see the steps taken in PICCLES.

Pupil Materials



You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *