Q. Which one of these is floor division?

  • (A) /
  • (B) //
  • (C) %
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) //
Explanation: when both of the operands are integer then python chops out the fraction part and gives you the round off value, to get the accurate answer use floor division. this is floor division. for ex, 5/2 = 2.5 but both of the operands are integer so answer of this expression in python is 2. to get the 2.5 answer, use floor division.

Explanation by: Mr. Dubey
when both of the operands are integer then python chops out the fraction part and gives you the round off value, to get the accurate answer use floor division. this is floor division. for ex, 5/2 = 2.5 but both of the operands are integer so answer of this expression in python is 2. to get the 2.5 answer, use floor division.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
976
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate