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
- LearnOne-dimensional arrays and lists
- CodeAccessing, updating and traversing
- LearnList operations: ArrayList and Python list
- LabList lab
- CodeAdding and removing
- CheckQuick check
- CodeIterators and enumerate
- CodeTotal, average, largest and count
- LearnTwo-dimensional arrays and lists
- LabGrid lab
- CodeHighest temperature of each week
- CodeA dynamic 2D list
- CheckQuick check
- CodeTry it: count the warm days
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 13 marks, with a self-marking markscheme.