nerdexam
CiscoCisco

350-401 · Question #928

350-401 Question #928: Real Exam Question with Answer & Explanation

The correct answer is B: 0 1 2 3 4 5. The Python code iterates through and prints a sequence of numbers from 0 up to and including 5, separated by spaces.

Submitted by parkjh· Mar 6, 2026

Question

Refer to the exhibit. What is output by this code?

Options

  • A0 5
  • B0 1 2 3 4 5
  • C0 1 2 3 4
  • D(0,5)

Explanation

The Python code iterates through and prints a sequence of numbers from 0 up to and including 5, separated by spaces.

Common mistakes.

  • A. This output implies only the start and end values were printed, not the entire sequence generated by a typical loop structure for range(0,5) or similar that includes intermediate values.
  • C. This output stops at 4, suggesting the range function used was exclusive of the last value, e.g., range(5) or range(0, 5).
  • D. This output format suggests a tuple (0, 5) was printed, not individual numbers in a sequence.

Concept tested. Python range() function and loop iteration

Reference. https://docs.python.org/3/library/stdtypes.html#range

Topics

#Programming basics#Code interpretation#Loops#Python syntax

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions