We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
mod operator in python is modulus, not remainder; this means it handles negatives differently from javascript.
-1 % 4
in python is 3, in javascript / c++ is -1
3
-1
To Reproduce Steps to reproduce the behavior:
python
Expected behavior
Maybe need a helper function for mod to convert to in python or something? It's a bit of an edge case.
Remembered they were different in python when responding to https://forum.makecode.com/t/remainder-modulus-operator-returning-negative-values-when-it-shouldnt/1789
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
mod operator in python is modulus, not remainder; this means it handles negatives differently from javascript.
in python is
3
, in javascript / c++ is-1
To Reproduce
Steps to reproduce the behavior:
python
)Expected behavior
Maybe need a helper function for mod to convert to in python or something? It's a bit of an edge case.
Remembered they were different in python when responding to https://forum.makecode.com/t/remainder-modulus-operator-returning-negative-values-when-it-shouldnt/1789
The text was updated successfully, but these errors were encountered: