Working with Lists and Dictionaries
Class 11 · Informatics Practices
4 ideas in Class 11 Informatics Practices, explained in plain words, with games and quizzes to practise.
List Handling
Part of: Lists at Work
Lists group ordered items; index, slice, append, sort; loops aggregate sums, counts.
Why it matters. Groups handled. Values gathered.
Formulas
- First index is 0; last is length - 1
- Negative index counts back from the end
Key words
- List
- : An ordered collection that can be changed in place.
- Index
- : The position number of an item, starting at zero.
- Slice
- : A section copied out with start and stop positions.
- Sort
- : Arranging items from small to large.
Try it in two minutes
- Bracket items?
- Edit members?
- Aggregate values?
Try at home. Total your marks.
Strings with Lists
Part of: Lists at Work
Split breaks text at marks; join merges pieces; loops count words; case methods clean.
Why it matters. Text split. Pieces joined.
Key words
- Split
- : Cutting text into pieces at chosen marks.
- Join
- : Gluing pieces together with a chosen separator.
- Case method
- : Changing letter case to compare words fairly.
- Text loop
- : Going through words one by one to count them.
Try it in two minutes
- Split at marks?
- Join pieces?
- Clean case?
Try at home. Split a sentence.
Dict Handling
Part of: Dict Work
Dicts map unique keys to values; lookup fast; add, get, update, loop keys values.
Why it matters. Lookups fast. Maps edited.
Formulas
- Dict keys must be unique
Key words
- Dictionary
- : Pairs of keys and values for fast lookup.
- Key
- : The unique label used to find a value.
- Value
- : The data stored under a key.
- Key lookup
- : Fetching a value instantly by its key.
Try it in two minutes
- Pair key value?
- Fetch safely?
- Loop all?
Try at home. Map marks subjects.
Tables and Counts
Part of: Dict Work
Dicts count frequencies; nested lists hold tables; rows looped, totals tallied.
Why it matters. Frequencies counted. Tables read.
Key words
- Frequency count
- : Tallying how often each item occurs.
- Nested list
- : Lists placed inside a list to hold table rows.
- Row loop
- : Handling one table row per loop round.
- Running total
- : Adding values up as the loop advances.
Try it in two minutes
- Count occurrences?
- Nest rows?
- Total columns?
Try at home. Count word repeats.
What your child will practise
- Dict Handling: Space Puzzle (Clue Puzzle)
- Dict Handling: Space Quick Fire (Quick Fire)
- List Handling: Ocean Puzzle (Clue Puzzle)
- Strings with Lists: Candy Quest (Flip and Match)
- Tables and Counts: Candy Quick Fire (Quick Fire)
- Quiz: Dict Handling (8 questions)
- Quiz: List Handling (8 questions)
- Quiz: Strings with Lists (8 questions)
- Quiz: Tables and Counts (8 questions)