Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
floor division uses the lower value. -3 is less than -2
15th Oct 2019, 9:12 AM
꧁༺ Jenspi ༻꧂
꧁༺ Jenspi ༻꧂ - avatar
+ 3
floor division (// operator) will round down to the lowest whole number. so 10//2 is just 5, but something like 11//2 would be 5 as well (normally 5.5). if you want normal division, you would have to use / which returns a float. you can do something like int(11/2) which will drop anything after the decimal place if you are trying to get only integers
15th Oct 2019, 9:27 AM
꧁༺ Jenspi ༻꧂
꧁༺ Jenspi ༻꧂ - avatar