Question 8 What is the output of the following code?
Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.
What is the output of the following code?
numbers = [1, 2, 3, 4, 5]
print([x for x in numbers if any(x % y == 0 for y in range(2, x))])
Pick ONE option
Show answer & explanation
Answer: A. A) [4]
Verified technical evaluation based on core computer science and mathematical principles.
Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.