Fatskills
Practice. Master. Repeat.
Study Guide: Computer Science - ICT Grade 6 Python Lists Strings Basic Operations
Source: https://www.fatskills.com/6th-grade-science/chapter/computer-science-ict-grade-6-python-lists-strings-basic-operations

Computer Science - ICT Grade 6 Python Lists Strings Basic Operations

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~5 min read

Grade 6 Computer Science (ICT) Study Guide: Python – Lists, Strings, Basic Operations


1. The Driving Question

"If you’re building a game where players collect items—like coins, keys, or power-ups—how do you store all those items in Python so the game remembers them, changes them, and checks what’s inside? And why can’t you just use a single variable for each one, like coin1 = 5, coin2 = 3, and so on forever?"


2. The Core Idea – Built, Not Listed

Imagine you’re running a school supply closet where you keep track of all the markers for art class. Instead of labeling each marker with a separate sticky note (marker1 = "red", marker2 = "blue"), you use a single box with dividers inside. That box is a list in Python—a container that holds many items in order, like markers = ["red", "blue", "green", "black"]. You can grab the first marker (markers[0]), add a new one (markers.append("purple")), or even swap two markers (markers[1] = "yellow").

But what if you want to work with words or sentences instead of items? That’s where strings come in. A string is like a stretchy rubber band with letters written on it—you can pull out a single letter ("hello"[1] gives "e"), slice a chunk ("hello"[1:4] gives "ell"), or glue two strings together ("hello" + " world"). Lists and strings both use indexing (counting positions starting at 0), but lists can hold any type of data (numbers, words, even other lists!), while strings only hold text.

Key Vocabulary:
- List: A container that holds multiple items in order, like a numbered shopping list.
Example: inventory = ["sword", 100, True] (holds a string, a number, and a boolean).
Note: In Python, lists are mutable—you can change them after creating them (unlike strings, which are immutable).


  • String: A sequence of characters (letters, numbers, symbols) treated as text.
    Example: player_name = "Alex_123" (can include letters, numbers, and underscores).
    Note: In high school, you’ll learn about string encoding (how computers store text as numbers) and regular expressions (tools to search and manipulate text patterns).

  • Index: The position of an item in a list or string, starting at 0.
    Example: In fruits = ["apple", "banana", "cherry"], "banana" is at index 1.
    Note: College courses often use zero-based indexing in algorithms, so Python’s choice isn’t arbitrary!

  • Concatenation: Combining two strings or lists into one.
    Example: "cat" + "dog" becomes "catdog"; [1, 2] + [3] becomes [1, 2, 3].
    Note: In data science, concatenation is used to merge datasets (e.g., combining two CSV files).


3. Assessment Translation

How This Appears on State/ICT Assessments (Grade 6):
- Multiple Choice: Tests understanding of indexing, list operations, or string methods.
Example: What does my_list[2] return if my_list = ["a", "b", "c", "d"]? Distractors: "a" (confuses index 0), "d" (counts from the end), "b" (off-by-one error).


  • Short Constructed Response: Write code to modify a list or string, or explain output.
    Example: Given colors = ["red", "green", "blue"], write a line of code to change "green" to "yellow". What is the new list?

  • Debugging: Identify and fix errors in code.
    Example: The code word = "python" print(word[6]) crashes. Why? Fix it.

Proficient vs. Developing Responses:
| Proficient | Developing | |----------------|----------------| | Prompt: What does len("hello") return? Explain. | | | Returns 5 because "hello" has 5 characters. The len() function counts the number of items in a string or list. | Returns 4 because they counted letters but forgot the first one (off-by-one error). | | Prompt: Write code to add "purple" to the end of colors = ["red", "blue"]. | | | colors.append("purple") or colors = colors + ["purple"] | colors = "purple" (replaces the list) or colors[2] = "purple" (assumes index 2 exists). |

Model Proficient Response (Short Constructed Response):
Prompt: Given pets = ["dog", "cat", "fish"], write code to: 1. Remove "cat" from the list.
2. Add "hamster" to the end.
3. Print the first item in the list.

Student Response:


pets.remove("cat")
pets.append("hamster")
print(pets[0])  # Output: dog


4. Mistake Taxonomy

Mistake 1: Off-by-One Indexing Errors
- Prompt: What does letters = ["a", "b", "c"] print(letters[3]) output? - Common Wrong Answer: "c" (student counts from 1 instead of 0).
- Why It Loses Credit: The list has indices 0, 1, 2. Index 3 is out of range, causing an error.
- Correct Approach: - Remember: Indexing starts at 0.
- Use len(letters) to check the last index (len(letters) - 1).
- Correct output: IndexError (the code crashes).

Mistake 2: Confusing Lists and Strings
- Prompt: What does "123" + 456 output? - Common Wrong Answer: "579" (student assumes strings and numbers can be added like numbers).
- Why It Loses Credit: Python can’t concatenate strings and integers directly.
- Correct Approach: - Convert the number to a string first: "123" + str(456)"123456".
- Or convert the string to an integer: int("123") + 456579.

Mistake 3: Misusing List Methods
- Prompt: Write code to remove "apple" from fruits = ["banana", "apple", "cherry"].
- Common Wrong Answer: fruits.delete("apple") or fruits.remove("apple", 1).
- Why It Loses Credit: delete isn’t a Python method; remove() only takes one argument.
- Correct Approach: - Use fruits.remove("apple") (removes the first occurrence).
- Or use del fruits[1] (removes by index).


5. Connection Layer

  1. Within Computer Science: Lists → Loops
  2. Lists store data, but loops process that data. For example, a for loop can print every item in a list (for item in my_list: print(item)), making lists useful for repetitive tasks.

  3. Across Subjects: Strings → DNA Sequences (Science)

  4. DNA is a "string" of nucleotides (A, T, C, G). Scientists use string operations (like slicing or searching for patterns) to analyze genetic code—just like you’d search for a word in a sentence.

  5. Outside School: Lists → Playlist Algorithms (Spotify/YouTube)

  6. Music apps use lists to store songs. When you "shuffle" a playlist, the app randomly reorders the list. When you "add to queue," it appends to the end—just like my_list.append("new_song").

6. The Stretch Question

"If strings are immutable (can’t be changed), how does word = "hello" word = word + "!" work? Doesn’t that change the string?"

Pointer Toward the Answer:
- When you write word = word + "!", Python doesn’t modify the original "hello" string. Instead, it creates a brand-new string "hello!" and reassigns the variable word to point to it. The old "hello" string still exists in memory (until Python’s garbage collector removes it).
- This is why strings are called "immutable"—you can’t change them in place, but you can create new strings based on them. Lists, on the other hand, are mutable: my_list.append("new") changes the list directly.
- Bonus: In college, you’ll learn about memory management and why immutability matters for security (e.g., preventing accidental changes to sensitive data).



ADVERTISEMENT