ProgrammingHardTCS NQT · Wipro pattern

What is printed?

What is printed?
print(1e3, 1000.0 == 1e3, 10 ** -2)
  1. A. 1000 True 0.01
  2. B. 1000.0 False 0.01
  3. C. 1000.0 True 0.1
  4. D. 1000.0 True 0.01

Correct answer: D. 1000.0 True 0.01

1e3 is a float that prints as 1000.0, and 10 ** -2 is the float 0.01.

More Python Programming questions

Exams that ask this topic