ProgrammingVery hardProduct-company MCQ pattern

What is printed?

What is printed?
print(len(str(7**77)), 7**77 % 1000, str(7**77)[-3:], int(str(7**77)[:3]))
  1. A. 66 207 207 117
  2. B. 66 206 207 118
  3. C. 65 207 207 118
  4. D. 66 207 207 118

Correct answer: D. 66 207 207 118

7 to the power 77 has 66 digits. Its last three digits give the same value as 7**77 % 1000, and its leading three digits are 118.

More Python Programming questions

Exams that ask this topic