🎙 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 10 of 14

What does this print? (code)

What does this print?

print(10 / 5, 10 // 5)
  1. A.2 2
  2. B.2.0 2.0
  3. C.2.0 2
  4. D.2 2.0
Answer & explanation

Correct answer: 2.0 2

/ always gives a float; // between two ints gives an int.

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 →