$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #195

What is the output?

print(-7 // 2, -7 % 2)
  1. -4 1
  2. -3 -1
  3. -4 -1
  4. -3 1
Python floors towards negative infinity and its modulo takes the divisor's sign.
Play Problem Solving ▸