ProgrammingHardProduct-company MCQ pattern

What is printed?

What is printed?
print(1_000_000 * 1_000_000 == 10**12, 10**6 ** 2 == 10**12, 2**3 ** 2 == 64)
  1. A. True True False
  2. B. False False False
  3. C. True False True
  4. D. True False False

Correct answer: D. True False False

** binds tighter than the surrounding operations and is right-associative, so 10**6 ** 2 is 10**36, not (10**6)**2. Likewise 2**3 ** 2 is 2**9 = 512.

More Python Programming questions

Exams that ask this topic