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 // 2is3, and7 % 2is1, neither of which is0. - C.
7is the value ofx, not the result of the division. - D.
7.5would 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.