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
  • Correct Answer - Option(B)
  • Views: 149
  • Filed under category Python

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.

Be the first to start discuss.


Question analytics