The // operator in Python performs:
-
A
Normal division
-
B
Floor division
Correct answer
-
C
Modulus
-
D
Exponentiation
Correct answer
B. Floor division
9 views
Explanation
// is floor division. It divides and rounds down to the nearest integer. 7 // 2 gives 3, while 7 / 2 gives 3.5.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ