can you explain the floor division and modulo operator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

can you explain the floor division and modulo operator

25th Mar 2020, 9:27 AM
Henry Punnoose
Henry Punnoose - avatar
2 Answers
+ 3
Floor division devides the numbers and discard the fractional part of the result. For example:- 5//2 = 2 Whereas modulo operator devides the number and returns remainder. For example:- 5%2 = 1
25th Mar 2020, 9:32 AM
Arsenic
Arsenic - avatar