ProgrammingVery hardTCS CodeVita · Infosys HackWithInfy

What is printed?

What is printed?
print(2 ** 0.5 * 2 ** 0.5, 2 ** 0.5 * 2 ** 0.5 == 2.0, round(2 ** 0.5 * 2 ** 0.5))
  1. A. 2.0000000000000004 True 2
  2. B. 2.0000000000000004 False 3
  3. C. 2.0000000000000004 False 2
  4. D. 2.0 True 2

Correct answer: C. 2.0000000000000004 False 2

The product is 2.0000000000000004, so it is not equal to 2.0 and the check is False. round gives the int 2.

More Python Programming questions

Exams that ask this topic