ProgrammingHardProduct-company MCQ pattern

What is printed?

What is printed?
print(len(str(3**100)), str(3**100)[-1], str(3**100)[:3])
  1. A. 48 1 515
  2. B. 48 9 515
  3. C. 49 1 515
  4. D. 48 1 516

Correct answer: A. 48 1 515

3 to the power 100 has 48 digits. Powers of 3 cycle every four in the last digit, 3, 9, 7, 1, and 100 is a multiple of four, so the last digit is 1.

More Python Programming questions

Exams that ask this topic