Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
As per https://stackoverflow.com/questions/3883004/the-modulo-operation-on-negative-numbers-in-JUMP_LINK__&&__python__&&__JUMP_LINK , remainder in python has to be always positive for positive and negative numbers . So in your example -25.5%2.25 = 1.5 , -25 could be represented as -12*2.25 + 1.5, that is why you got 1.5 as a result