ProgrammingVery hardProduct-company MCQ pattern

What is printed on the first line?

What is printed on the first line?
print(min(0.0, -0.0), max(-0.0, 0.0), min(-0.0, 0.0), -0.0 < 0.0)
  1. A. 0.0 -0.0 -0.0 True
  2. B. 1.0 -0.0 -0.0 False
  3. C. 0.0 0.5 -0.0 False
  4. D. 0.0 -0.0 -0.0 False

Correct answer: D. 0.0 -0.0 -0.0 False

min and max return the first argument when two values compare equal, and -0.0 == 0.0 is True. So min(0.0, -0.0) keeps 0.0 and max(-0.0, 0.0) keeps -0.0.

More Python Programming questions

Exams that ask this topic