OCR GCSE Computer Science (J277)Specification point 2.2.3

OCR J277 2.2.3: Additional programming techniques

The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.

Lessons that teach it

  1. F1.3 Calling functions Programming basics
    Arguments, telling and asking, and notes on the robot's buzzer.
  2. F3.1 String handling Strings, lists and records
    Length, indexing, slicing, searching and joining strings, and f-strings.
  3. F3.3 Lists: one-dimensional arrays Strings, lists and records
    Making, indexing and changing a list; append, remove, in, split and join.
  4. F3.4 Iterating over a list Strings, lists and records
    Loops over items and indexes, totals, counts, min and max, and linear search.
  5. F3.5 Two-dimensional arrays Strings, lists and records
    Rows and columns: the depth grid as a list of lists.
  6. F3.6 Records Strings, lists and records
    Grouping related fields: a sensor reading as a record, and a list of records as a table.
  7. F3.7 Random numbers Strings, lists and records
    randint, choice and seeds: dice, random tunes and a robot that wanders.
  8. F4.1 Writing functions Functions and structured code
    def, calling, and why subprograms help.
  9. F4.2 Parameters and return values Functions and structured code
    Information in and an answer out; procedures and functions.
  10. F4.3 Local and global variables Functions and structured code
    Scope: where a variable exists, and why passing values beats global.
  11. F4.5 Libraries and your own modules Functions and structured code
    import, Python's own libraries, and a module file of your own.
  12. F7.1 Reading and writing files Files and databases
    Open, read, write, append and close: a run log in a CSV file.
  13. F7.2 Relational databases Files and databases
    Tables, records, fields, primary and foreign keys, and avoiding redundancy.
  14. F7.3 SQL: SELECT Files and databases
    SELECT, FROM, WHERE and ORDER BY on the class's robot runs.
  15. F7.4 SQL: two tables and changing data Files and databases
    Queries across two tables; INSERT, UPDATE and DELETE, and the robot logging its own runs.

Try it on a robot

The task from F1.3 Calling functions, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is OCR's own document; this page says which of our lessons teach point 2.2.3 and is not endorsed by the board.