Integer Division Operator //
Unlike the /
operator, which returns a floating-point result, the integer division operator //
discards the decimal part and returns only the integer portion of the division.
For example, dividing 10 by 3 using the /
operator yields a result of 3.3333333333333335
.
/ Operator Example
result_float = 10 / 3 print(result_float) # 3.3333333333333335
In contrast, dividing 10 by 3 using the //
operator results in the integer 3
.
// Operator Example
result_int = 10 // 3 print(result_int) # 3
Mission
0 / 1
The integer division operator //
rounds up the result of division to return an integer value.
True
False
Lecture
AI Tutor
Publish
Design
Upload
Notes
Favorites
Help
Code Editor
Run
Generate
Execution Result