Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Why Does the calculation vary in python?
Asked
Nov 04 '20 at 06:42
Active
Nov 04 '20 at 07:28
Viewed
41 times
1
In java: -2 % 6 = -2
In python -2 % 6 = 4
Why this happens. could you please explain it?
java
python
logical-operators
modulo
edited Nov 04 '20 at 07:28
F. Müller
3,969
8
38
49
asked Nov 04 '20 at 06:42
Kumaresan Perumal
1,926
2
29
35
[Best way to make Java's modulus behave like it should with negative numbers?](https://stackoverflow.com/q/4412179/12323248)
–
akuzminykh
Nov 04 '20 at 06:47
0 Answers
0