B2.2 Data structuresB2.2.2

Construct programs that apply arrays and lists

Construct programs that apply arrays and lists

SL + HL≈ 70 minCommand term: ConstructPremium

In this lesson

  • Creating, accessing, updating and traversing one-dimensional arrays and lists
  • Adding, inserting and removing items in an ArrayList or Python list
  • Using two-dimensional arrays and lists with nested loops
  • Constructing programs that count, total, search and find the largest value

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. LearnOne-dimensional arrays and lists
  2. CodeAccessing, updating and traversing
  3. LearnList operations: ArrayList and Python list
  4. LabList lab
  5. CodeAdding and removing
  6. CheckQuick check
  7. CodeIterators and enumerate
  8. CodeTotal, average, largest and count
  9. LearnTwo-dimensional arrays and lists
  10. LabGrid lab
  11. CodeHighest temperature of each week
  12. CodeA dynamic 2D list
  13. CheckQuick check
  14. CodeTry it: count the warm days
  15. ExamWorked exam answer
  16. ReviewMistakes examiners see
  17. Exam practiceExam-style questions

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