🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Operators and Input: all 14 questions

Quiz: Python Operators and Input · Question 7 of 14

What does this print? (code)

What does this print?

print(-7 // 2)
  1. A.-3
  2. B.-4
  3. C.-3.5
  4. D.3
Answer & explanation

Correct answer: -4

Floor division rounds DOWN, towards minus infinity.

Can you get the rest right without peeking?

Take the timed Quiz: Python Operators and Input quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →