ProgrammingVery hardTCS CodeVita · Infosys HackWithInfy

What is printed?

What is printed?
print(int(str(2 ** 70)[:5]), len(str(2 ** 70)))
  1. A. 11805 22
  2. B. 11805 21
  3. C. 11804 22
  4. D. 11805 23

Correct answer: A. 11805 22

2**70 = 1180591620717411303424, which starts with 11805 and has 22 digits.

More Python Programming questions

Exams that ask this topic