Strings, lists and records

Strings taken apart and joined, character codes, lists and 2D arrays, records and random numbers: the robot's readings and messages as data.

Module F3GCSE8 lessons

Start in the simulator
  1. F3.1 String handling Length, indexing, slicing, searching and joining strings, and f-strings.
  2. F3.2 Character codes and conversion ord and chr, ASCII, comparing strings, and a Caesar cipher.
  3. F3.3 Lists: one-dimensional arrays Making, indexing and changing a list; append, remove, in, split and join.
  4. F3.4 Iterating over a list Loops over items and indexes, totals, counts, min and max, and linear search.
  5. F3.5 Two-dimensional arrays Rows and columns: the depth grid as a list of lists.
  6. F3.6 Records Grouping related fields: a sensor reading as a record, and a list of records as a table.
  7. F3.7 Random numbers randint, choice and seeds: dice, random tunes and a robot that wanders.
  8. F3.8 Project: survey the room Look in eight directions, store the survey as records, report on it and head for open space.