• Cursos
  • Code Compiler
  • Discussão
  • Preços
  • Equipas
Menu
+ 2

-1%3=2 how it happened

Python

python
9th Jan 2023, 7:58 AM
janvi vashistha
1 Resposta
+ 8
In Python, the modulo of negative numbers works differently from other languages like C or JavaScript. Read more details here: https://stackoverflow.com/questions/3883004/the-modulo-operation-on-negative-numbers-in-python And "how it happened" by Guido van Rossum himself: https://python-history.blogspot.com/2010/08/why-pythons-integer-division-floors.html
9th Jan 2023, 8:14 AM
Tibor Santa
Tibor Santa - avatar

Tens frequentemente perguntas como esta?

Aprende de forma mais eficiente, gratuitamente:

  • Introdução ao Python

    7,1M de estudantes

  • Introdução ao Java

    4,7M de estudantes

  • Introdução ao C

    1,5M alunos

  • Introdução ao HTML

    7,5M alunos

Ver todos os cursos
Popular hoje
I need help
1 Votes
a phone or a laptop
0 Votes
Java IDE for building a game.
0 Votes
Best programming languages to get a job fast ?
0 Votes
Where is code bit
0 Votes
How to make a selection on a calculator in Python
0 Votes
Conducción de calor o Q=−kAdTdxQ = -k A \frac{dT}{dx}Q=−kAdxdT o Pared 2 m², espesor 0.1 m, k = 50 W/m°C, ΔT = 30°C → Q ≈ 30,0
0 Votes
Certificates
0 Votes
Regarding platform
1 Votes
Inquiry for img code
0 Votes