Vidyalelo
Python · Q12

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 12

Q12

What does the '//' operator do when used with negative numbers?

A.
Returns the positive quotient
B.
Returns the negative quotient
C.
Rounds down to the nearest integer
Answer
D.
Rounds up to the nearest integer

Answer: Option C

Solution

Answer: Option C
Solution:
The // operator performs floor division, rounding down.