christopher180
christopher180 Aug 3, 2026 • 20 views

Multiple Choice Questions on Lists for AP Computer Science

Hey there! 👋 Get ready to test your knowledge of Lists in AP Computer Science! I've put together a quick study guide and a practice quiz to help you ace those exams. Let's get started! 💻
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
kurt_allen Dec 28, 2025

📚 Quick Study Guide

  • 📝 Lists are ordered sequences of elements. These elements can be of any data type (integers, strings, other lists, etc.).
  • 💻 In Python (the language commonly used in AP Computer Science), lists are mutable, meaning their contents can be changed after creation.
  • ➕ You can access elements in a list using their index, starting from 0. For example, `my_list[0]` accesses the first element.
  • ✂️ Slicing allows you to create a new list that is a subset of an existing list: `my_list[start:end]`.
  • 🔗 Common list methods include `append()`, `insert()`, `remove()`, `pop()`, and `len()`.
  • 💡 The `len()` function returns the number of elements in a list.
  • 🔄 List comprehensions offer a concise way to create new lists based on existing ones.

🧪 Practice Quiz

  1. Which of the following statements about lists in Python is NOT true?
    1. Lists are mutable.
    2. Lists can contain elements of different data types.
    3. List indices start at 1.
    4. Lists can be sliced.
  2. What is the output of the following code? python my_list = [1, 2, 3, 4, 5] print(my_list[2])
    1. 1
    2. 2
    3. 3
    4. 4
  3. Which list method adds an element to the end of the list?
    1. `add()`
    2. `insert()`
    3. `append()`
    4. `extend()`
  4. What will be the output of the following code? python my_list = [10, 20, 30] my_list.insert(1, 15) print(my_list)
    1. `[10, 20, 30, 15]`
    2. `[10, 15, 20, 30]`
    3. `[15, 10, 20, 30]`
    4. `[10, 20, 15, 30]`
  5. Which of the following correctly calculates the length of a list named `my_list`?
    1. `my_list.length()`
    2. `len(my_list)`
    3. `size(my_list)`
    4. `my_list.size()`
  6. What is the output of the following list comprehension? python numbers = [1, 2, 3, 4, 5] squares = [x**2 for x in numbers] print(squares)
    1. `[1, 4, 9, 16, 25]`
    2. `[1, 2, 3, 4, 5]`
    3. `[2, 4, 6, 8, 10]`
    4. `[1, 8, 27, 64, 125]`
  7. Which method removes the first occurrence of a specified value from a list?
    1. `delete()`
    2. `remove()`
    3. `pop()`
    4. `discard()`
Click to see Answers
  1. C
  2. C
  3. C
  4. B
  5. B
  6. A
  7. B

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀