Programming and Problem Solving for Year 12


A Workbook for Year 12 Programming

In 2012, many teachers without a formal background in programming will be asked to teach program design and the coding of a solution in a programming language. This is a significant step up and we are doing what we can to help.

In 2011, we developed a workbook which is compatible with the new Digital Technology Achievement Standards 2.45 and 2.46 for NCEA level 2. The student version of the workbook has now been revised and is ready to be used in the classroom. Any teacher who wishes to look at it with a view to using it should request a copy from

The workbook covers the material required for assessment standards 2.45 and 2.46 and a little bit more, but is not "teaching to the standard". The workbook tries to stay focused on the process of problem solving rather than the syntax of any particular language. The problems should be able to be coded in any language from a common algorithm.

After some debate and many trials, we decided to provide a choice of two real-world programming languages in our examples. We use Python and Java. This will make the flow on to year 13 easy, as both of these languages allow Object Oriented design, although we will do not use this aspect of them in the year 12 workbook. There is plenty of on-line assistance for these languages, there are well-tested and reliable (and free) platforms and development environments for both Windows and Mac.

If you have a favourite language, you could take the concepts and ideas and adapt them to the syntax it uses. Any language that can easily produce textual output to the display/screen and has indexed data structures could be used.

What, no graphics? We have unashamedly chosen not to use graphical output because the amount of material to be learned covering the core programming concepts as well as graphics and animation would not fit in the 60 hour target. We believe that problem solving is an enjoyable exercise in its own right.

The material is written with as little jargon as possible and uses plenty of examples. The problems range from easy to challenging. It is impossible to write a "one size fits all" lesson, so each student will be able to choose whether they wish to have a go at the more challenging exercises, or be satisfied with completing the elementary problems.

Each school which uses this material will be charged $100, a share of the cost of its development.

Workbook Contents

  • Chapter 0 - Java and Python, setting up (teacher's version only)
  • Chapter 1 - The process of programming
  • Chapter 2 - Variables and Expressions
  • Chapter 3 - Modular programming
  • Chapter 4 - Getting input, formatting output
  • Chapter 5 - Boolean and Selection
  • Chapter 6 - Repetition
  • Chapter 7 - Arrays (Java) / Lists (Python)
  • Chapter 8 - Strings
  • Appendix - contains model answers and notes for the teacher (teacher's version only)
  • A Bridge to the Standards - an adaptation of the paper presented to the December 2011 CS4HS workshop in Christchurch (teacher's version only)

Year 13

We have also produced Python and Java workbooks for Year 13 / Digital Technology Achievement Standard 3.46 / NCEA level 3. The books follow on from the Year 12 versions in the same language, and cover Object Oriented Programming and Graphical User Interfaces. We ask for $200 from each school using these books as a share in the cost of their development.


Professional Practice Fellow Sandy Garner and Professor Anthony Robins

We are the people who design and teach the first year of the computer science degree program at the University of Otago. We have many years of experience teaching programming at this level. We know where high school students should be aiming if they are intending to study programming at a higher level. We are also parents with children at various stages of the NZ secondary school system, and have taught programming at primary, intermediate and secondary schools through our involvement with robotics and RobocupJuniorNZ.