int_divmod.py 202 B

1234567
  1. # test integer floor division and modulo
  2. # test all combination of +/-/0 cases
  3. for i in range(-2, 3):
  4. for j in range(-4, 5):
  5. if j != 0:
  6. print(i, j, i // j, i % j, divmod(i, j))