We began with demonstrating how to run programs. In this topic, we will look at how we can write basic programs.
Specifically, we will dive into basic programming paradigms looking at:
- Bindings how we can store data in addressable locations;
- Expressions for primitive operations on data;
- Conditionals for simple control flow based on boolean values;
- Methods/Functions for structuring our programs into small, more manageable, blocks;
- Loops for repeating code whilst a condition holds;
- Iterations for repeating code whilst iterating over a data structure;
- Recursion for repeating code without the need for explicit control flow statements;
- Sequences for working with data that can be sequenced;
Learning Outcomes
By the end of this topic, for each language, you will:
- be able to write simple programs that operate on builtins;
- be able to write simple programs using various forms of control flow;
- be able to divide programs into method/functions;
- be able to write programs using sequences;