ProgrammingVery hardProduct-company MCQ pattern

What is printed?

What is printed?
print(int('1' * 30) % 97, pow(10, 30, 97), (10**30 - 1) // 9 % 97)
  1. A. 74 85 73
  2. B. 74 85 74
  3. C. 75 85 74
  4. D. 74 84 74

Correct answer: B. 74 85 74

The 30-digit string of ones is the same number as (10**30 - 1) // 9, so the first and third values match. pow with a modulus gives the remainder of 10**30 directly, which is 85.

More Python Programming questions

Exams that ask this topic