Tooltip
These resources have been reviewed and selected by STEM Learning’s team of education specialists for factual accuracy and relevance to teaching STEM subjects in UK schools.

# Programming Techniques

The basics of programming are explored through a “beat that dice” game.  It is assumed that students already have some knowledge and experience of programming before watching the first video, and the purpose of this video is to marry the theory of programming to the established practical experience in preparation for exams.

The second video explains the three basic programming constructs of sequence, selection and iteration.  It is assumed that students already have some programming experience with these constructs, and the purpose of this video is to marry the theory of programming to their practical experience in preparation for exams.  Securing the key terminology.

The third video explains the purpose of string manipulation and introduces the pseudocode key words used by OCR in exams.  It is assumed that students have some practical experience of programming already.  This video aims to marry their practical experience with the theory in preparation for exams.

The fourth video explains the use of simple serial text file handling in Python.  It is assumed that students already have some experience of programming, and the purpose of this video is to outline the key stages of using files so that students are able to answer related questions in exams.  This includes opening, reading, writing and closing a data file.

The fifth video explores the concept of arrays, both one and two-dimensional, and how they are implemented with lists in Python.  It is assumed that students already have programming experience with variables.

The sixth video explores the use of functions and procedures to produce structured code.  It is assumed that students already have knowledge and experience of programming, and the purpose of this video is to marry the theory and practice to prepare students for exams.

Through the example of a “beat that dice” game, the seventh video explains how variables are stored in memory and how their data type can be changed using keywords for casting.

You will already be familiar with the operators +, -, * and /.  In addition to these there are the less well understood modulus and integer division.  The eighth video explains the use of each of the operators in programming with simple examples.

The ninth video explains the Boolean operators: not, and, or, together with their associated symbols.

A collection of related data items is known as a record.  These can be stored in simple text files, in multi-dimensional arrays or in a database.  The tenth video illustrates these methods.

The eleventh video introduces students to structured query language (SQL) as a data manipulation language using SQL Lite and Python as the example of a back-end and front-end data retrieval system.  This video only covers the keywords needed for exams: select, from, where, like, and, or with the wildcards * and %.

Resources:

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-variables-constants-operators-inputs-outputs-and-assignments

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-the-three-basic-programming-constructs

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-basic-string-manipulation

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-basic-file-handling-operations

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-arrays

https://student.craigndave.org/videos/ocr-gcse-slr2-2-how-to-use-sub-programs

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-data-types-and-casting

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-common-arithmetic-operators

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-common-boolean-operators

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-records-to-store-data

https://student.craigndave.org/videos/ocr-gcse-slr2-2-the-use-of-sql-to-search-for-data

#### Show health and safety information

Please be aware that resources have been published on the website in the form that they were originally supplied. This means that procedures reflect general practice and standards applicable at the time resources were produced and cannot be assumed to be acceptable today. Website users are fully responsible for ensuring that any activity, including practical work, which they carry out is in accordance with current regulations related to health and safety and that an appropriate risk assessment has been carried out.

Information on the permitted use of this resource is covered by the Category Three Content section in STEM Learning’s Terms and conditions.