Courseiva

PCAP Object-Oriented Programming Practice Question

Match each list method to its effect.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Adds x to end

Appends elements from iterable

Inserts x at index i

Removes first occurrence of x

Removes and returns last item

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

append: Adds an element to the end of the list.

Common list methods: append adds an element to the end, extend adds all elements from an iterable, remove deletes the first occurrence of a value, pop removes an element by index, and sort arranges the list in ascending order by default.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    append: Adds an element to the end of the list.

    Why this is correct

    append() treats its argument as a single object, inserting that object as one new element at the end of the list. Even if the argument is itself a list, tuple, or other container, the list's length increases by exactly one. This method mutates the list in place, so it returns None rather than constructing a new list.

  • ✓

    extend: Extends the list by appending elements from an iterable.

    Why this is correct

    extend() fetches each item from the supplied iterable and appends those items individually, so the list grows by the number of elements in the iterable. It is essentially the in-place version of list concatenation for iterables, and when given a string it will add each character as a separate element. Because it mutates the original list and returns None, it should not be confused with the + operator, which creates a new list.

  • ✓

    remove: Removes the first occurrence of a specified value.

    Why this is correct

    remove() locates the first element whose value compares equal to the argument by testing each element with __eq__ and shifts all later elements left to close the gap. If no matching value exists, it raises ValueError to signal the failed search. This operation scans from index 0, so it is O(n) and only deletes a single occurrence, even if duplicates are present.

  • ✗

    pop: Removes the first occurrence of a specified value.

    Why it's wrong here

    This description is wrong because pop() removes and returns an element by position, not by value. Calling pop() with no argument pops the last element, and pop(i) removes the element at index i, supplying no search semantics at all. To delete the first occurrence of a value, a user must call remove(); pop() would require first finding the index with index() and then calling pop(index).

  • ✗

    sort: Sorts the list in descending order.

    Why it's wrong here

    This description is incorrect because sort() defaults to ascending order, placing the smallest element first. Descending order requires explicitly passing reverse=True, as in lst.sort(reverse=True), which then reorders the sequence in place. Additionally, sort() is stable, meaning equal elements keep their original relative order, and it does not return a new list; sorted(), by contrast, returns a new sorted list.

About these practice questions

Courseiva writes every PCAP question from scratch — 421 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.