Floor division and modulo operator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Floor division and modulo operator

What is floor division and modulo operator

27th May 2019, 9:29 AM
Mansi
Mansi - avatar
2 Answers
+ 1
Please use the search bar🔎 Floor division returns the result of a division with no remainder (an integer) 5 // 2 = 2 2 goes into 5 twice, with a remainder of 1 The modulo operator (%) returns the remainder of a division 5 % 2 = 1 because the remainder is 1 I hope this helps, please ask if you have further questions
27th May 2019, 9:30 AM
Trigger
Trigger - avatar
+ 4
Floor division - Divides and returns the remainder after removing decimal Modulus : returns the remainder Mansi refer to this for learning floor division and modulus . https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2273/ Thanks
27th May 2019, 9:53 AM
Prince PS[Not_Active]
Prince PS[Not_Active] - avatar