ProgrammingHardProduct-company MCQ pattern

What is printed?

What is printed?
print(str(2**100)[:5], len(str(2**100)), str(2**100).count('0'))
  1. A. 12676 30 6
  2. B. 12676 31 5
  3. C. 12676 31 6
  4. D. 12675 31 6

Correct answer: C. 12676 31 6

2 to the power 100 has 31 digits, and its first five digits are 12676. Six of those digits are zeros.

More Python Programming questions

Exams that ask this topic