Programming (also called coding) is a vital part of Computer Science, especially for the Paper 2 component. Here follows what you need to know in Python (we recommend version 3). We use as our online Python 3 IDE.

The syllabus requires students to be familiar with the following aspects of programming:

  • Identify and use variables, operators, inputs, outputs and assignments
  • Understand and use the three basic programming constructs used to control the flow of a program: Sequence; Selection; Iteration
  • Understand and use suitable loops including count and condition controlled loops
  • Use different types of data, including boolean, string, integer and real, appropriately in solutions to problems
  • Understand and use basic string manipulation
  • Understand and use basic file handling operations: open, read, write & close
  • Define and use arrays (or equivalent) as appropriate when solving problems
  • Understand and use functions/sub programs to create structured code

Students must know these concepts both in structured programming (Python) AND pseudo code.

When designing algorithms, students are required to do so using both pseudo code and flow charts. OCR is rather prescriptive about both, so here are some guidance on both: