A

Admin • 833K Points
Coach

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: 30
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

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.