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