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

  1. LearnFunctions
  2. CodeDefining and calling a function
  3. LabFollow the calls
  4. CodeReturning a value or not
  5. CheckMatch the terms
  6. LearnModularization
  7. LearnLibraries
  8. CodeUsing the maths library
  9. CodeUsing the random library
  10. CheckQuick check
  11. ExamWorked exam answer
  12. ReviewMistakes examiners see
  13. Exam practiceExam-style questions

Ends with 4 exam-style questions worth 10 marks, with a self-marking markscheme.