Building a modular program
Computer Studies · Grade 10 · about 40 minutes
A school-mark reporter from small functions: input, average, grade, report - the 3.6 outcome in one sitting.
Sign in to read this lesson
Lessons are for learners and teachers with an account. Browsing the curriculum — subjects, strands and what each sub-strand covers — stays open to everyone.
- 8 sections of explanation, worked examples and diagrams
- 1 practice task with hints and worked answers
- A quiz that marks itself as you go
- Your progress kept across every subject you take
Other lessons in this sub-strand
- Functions and modular programming
- Parameter passing and variable scope
- Why modular programming
- Built-in functions in practice
- Writing a function definition
- Parameters: giving a function data
- Return values: getting a result back
- Functions calling functions
- Formal and actual parameters
- Local variables in practice
- Global variables and constants
- Value-returning and void functions
- Building a modular program
- The roles of functions