ProgrammingVery hardProduct-company MCQ pattern

What is printed?

What is printed?
print(0.5 ** 1074 == 0, 5e-324 > 0, 5e-324 / 2 == 0)
  1. A. True True True
  2. B. False True False
  3. C. False True True
  4. D. True False True

Correct answer: C. False True True

0.5 ** 1074 is the smallest positive subnormal, so it is not zero. Halving the smallest subnormal rounds to zero, which is a tie that goes to the even value.

More Python Programming questions

Exams that ask this topic