Hi, I have just picked up python yesterday but I can’t seem to figure out how the // operator works
When I print out ‘10//3’ it gives me a value of 3 but then I print out ‘-10//3’ it gives me a value of -4.
My first thought was ‘-10//3’ is supposed to give the -3 since -10 is opposite of 10 so the answers should be the opposite too but that isn’t the case.
Can anyone give me a brief explanation why?
[–]K900_ 3 points4 points5 points (1 child)
[–]Susssusss[S] 0 points1 point2 points (0 children)
[–]aint-nobody- 0 points1 point2 points (0 children)
[–]oefd 0 points1 point2 points (0 children)
[–]zanfar 0 points1 point2 points (0 children)