Courseiva
Software Development and DesignhardMultiple ChoiceObjective-mapped

200-901 Software Development and Design Practice Question

Given the Python list comprehension: result = [x*2 for x in range(10) if x > 5] What is the value of result?

⚠ Common exam trap

The trap here is that candidates often forget the filter condition and include all values, or they mistakenly apply the multiplication to the filtered indices rather than the values, leading to options like C or D.

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

[12, 14, 16, 18]

The list comprehension `[x*2 for x in range(10) if x > 5]` iterates over `x` from 0 to 9, filters to only include `x` values greater than 5 (i.e., 6, 7, 8, 9), and multiplies each by 2, producing `[12, 14, 16, 18]`. This is a standard Python comprehension with a conditional filter.

Answer analysis

Option-by-option breakdown

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

  • [12, 14, 16, 18]

    Why this is correct

    Correct: x=6->12, 7->14, 8->16, 9->18.

  • [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]

    Why it's wrong here

    This would be without the if condition.

  • [10, 12, 14, 16, 18]

    Why it's wrong here

    Includes 10 which would correspond to x=5, but 5 is not >5.

  • [6, 7, 8, 9]

    Why it's wrong here

    These are the x values, not doubled.

About these practice questions

This 200-901 question is part of Courseiva's 989-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 200-901 practice question is part of Courseiva's free Cisco 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 200-901 exam.