4. Modules and Functions#
Develop structured algorithms using pseudocode and flowcharts, including the use of subprograms
Pseudocode
Flowcharts
Analyse the logic and structure of written algorithms
determining connections of written algorithms to other subroutines or functions
Identify procedures and functions in an algorithm
Investigate the use of number systems for computing purposes, including binary, decimal and hexadecimal
Represent integers using two’s complement
Investigate standard data types
date and time
Apply skills in computational thinking and programming to develop a software solution
converting an algorithm into code
using standard modules
creating relevant subprograms that incorporate parameter passing
Determine typical errors experienced when developing code, including syntax, logic and runtime, and explain their likely causes
Chapter Contents
- 4.1. Modules
- 4.2. The Math Module
- 4.3. Random Integers
- 4.4. Random Floats and Using Probabilities
- 4.5. Pseudorandomness
- 4.6. Time
- 4.7.
datetime - 4.8. Functions
- 4.9. Function Scope
- 4.10. Optional Parameters (Keyword Arguments)
- 4.11. Function Returns
- 4.12. Custom Modules
- 4.13. Representing Numbers in Binary
- 4.14. Two’s Complement
- 4.15. The Hexadecimal System
- 4.16. ASCII
- 4.17. Pseudocode and Flowcharts