B2.3 Programming constructsB2.3.4
Construct functions and modularization
Construct functions and modularization
SL + HL≈ 60 minCommand term: ConstructPremium
In this lesson
- Defining and calling functions (methods) with parameters and return values
- Distinguishing parameters from arguments, and functions that return a value from those that do not
- Explaining the advantages of modularization
- Using library modules such as Math/math and Random/random
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnFunctions
- CodeDefining and calling a function
- LabFollow the calls
- CodeReturning a value or not
- CheckMatch the terms
- LearnModularization
- LearnLibraries
- CodeUsing the maths library
- CodeUsing the random library
- CheckQuick check
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 10 marks, with a self-marking markscheme.