ScanSkill

// (floor division)

This // (floor division) arithmetic operator returns an integral part of the quotient of the two expressions.

Syntax

A // B

Here,

  • A: An expression that is evaluating to a numeric type.
  • B: An expression that is evaluating to a numeric type.

Note: Resultant value is a whole integer, though the result’s type is not necessarily int.

Examples

>>> 5.0 / 2
2.5
>>> 5.0 // 2
2.0