Home / Programming MCQs / Python MCQs / Question

T

Tanmay • 2.43K Points
Master

Q. What is the output of the following code?

Code:
x = 2.5
y = 2
print x//y
(A) 1
(B) 1.0
(C) 1.5
(D) Error
Explanation by: Tanmay
This type of division is called a “truncated division” where the remainder is truncated or removed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.