$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #62

What is printed?

print(-7 // 2)
  1. -4
  2. -3
  3. 3
  4. -3.5
Floor division rounds toward negative infinity, not toward zero.
Play Problem Solving ▸