B2.1 Programming fundamentalsB2.1.2

Construct programs that can extract and manipulate substrings

Construct programs that can extract and manipulate substrings

SL + HL≈ 55 minCommand term: ConstructPremium

In this lesson

  • Using indices to identify characters and substrings in a string
  • Extracting substrings and finding text with string methods in Java and Python
  • Altering, replacing, splitting and joining strings
  • Constructing programs that combine these operations

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. LearnStrings and indices
  2. CodeIdentifying and extracting
  3. LearnString operations: Java and Python
  4. LabString lab
  5. CodeAltering and joining strings
  6. CheckQuick check
  7. CheckQuick check
  8. CodeTry it: extract a domain
  9. ExamWorked exam answer
  10. ReviewMistakes examiners see
  11. Exam practiceExam-style questions

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