nerdexam
CiscoCisco

350-401 · Question #1267

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

The correct answer is A: 1. The Python code snippet, assuming an intended modulo operation (%), calculates the remainder of 7 divided by 2.

Submitted by miguelv· Mar 6, 2026Automation and Programmability

Question

Refer to the exhibit. What is the result of this Python code?

Options

  • A1
  • B0
  • C7
  • D7.5

Explanation

The Python code snippet, assuming an intended modulo operation (%), calculates the remainder of 7 divided by 2.

Common mistakes.

  • B. The result of 7 // 2 is 3, and 7 % 2 is 1, neither of which is 0.
  • C. 7 is the value of x, not the result of the division.
  • D. 7.5 would result from floating-point division (7 / 2), not integer division (//) or modulo (%).

Concept tested. Python arithmetic operators (floor division vs. modulo)

Reference. https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations

Topics

#Python operators#Python data types#Python syntax#Python output

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions