Informatics — Grade 9
Programming in Python: variables, conditions and loops, lists, strings, functions, modules and files.
- 11 topics
- 4 chapters
- 16 min
Topics
Topics are grouped into chapters and listed in reading order.
5 topics
- 6
Working with Lists
A list stores several values in one variable. We learn to access items by index, add and remove them, and loop over a list.
Chapter 2. Lists and Strings1 min
- 7
Strings and String Operations
A string is a sequence of characters. We combine, slice, measure and search strings to process text data.
Chapter 2. Lists and Strings1 min
- 8
Creating Functions: def and Parameters
A function is a named piece of code that can be called many times. We create our own functions with def and pass data to them through parameters.
Chapter 3. Functions and Modules1 min
- 9
Functions That Return a Value: return
The return statement sends the result a function has calculated back to where it was called. With it we build complex programs from small functions.
Chapter 3. Functions and Modules1 min
- 10
Modules: math and random
A module is a collection of ready-made functions. We use math for calculations and random for random numbers to write fun game programs.
Chapter 3. Functions and Modules1 min