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

Quiz: Python Variables and Data Types · Question 10 of 15

What does this print? (code)

What does this print?

print(round(2.675, 2) == 2.68)
  1. A.True
  2. B.False
  3. C.2.68
  4. D.An error
Answer & explanation

Correct answer: False

2.675 can't be stored exactly in binary, so it rounds to 2.67 — a classic float surprise.

Can you get the rest right without peeking?

Take the timed Quiz: Python Variables and Data Types quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →