ProgrammingModerateTCS NQT · Infosys

What is printed?

What is printed?
print(10**100 // 10**98, (10**100) % 97 == pow(10, 100, 97))
  1. A. 100 False
  2. B. 100 True
  3. C. 10 True
  4. D. 98 True

Correct answer: B. 100 True

10**100 // 10**98 is exactly 100. pow with a modulus agrees with the % of the full exact integer, so the comparison is True.

More Python Programming questions

Exams that ask this topic