How to tackle a problem

Here is a problem:

“Calculate the perimeter

Design and implement a program that allows the user to enter 2 numbers representing the width and length of a rectangle. The program calculates and displays the perimeter of the rectangle.”


Where do you start?  Asking these x3 questions:

  1. What inputs is the system expecting?
  2. What is the system expected to output?
  3. How will the inputs be processed to make the output?
I use this framework on the whiteboard and encourage my students to do the same every problem they encounter.
  • Width of rectangle
  • Height of rectangle
  • Perimeter of rectangle = (width x 2) + (height x 2)
  • Perimeter of rectangle


Further details about this approach along with a range of assessed challenge sheets and a student Python crib sheet can be found in my book “Teaching to code: Newbie to GCSE”