Python Programming - Tricky Questions - Discussion

Discussion Forum : Tricky Questions - General Questions (Q.No. 3)
3.
What will be the output of the following Python code?
x = 5
y = 2

result = x // y
2.5
2
3
2.0
Answer: Option
Explanation:
The // operator performs integer division in Python, discarding any remainder. Therefore, 5 // 2 results in 2.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.