ProgrammingVery hardTCS CodeVita · Infosys HackWithInfy

What is printed?

What is printed?
print(pow(6, -1, 11), pow(4, -1, 9))
  1. A. 9 7
  2. B. 2 7
  3. C. 2 5
  4. D. 6 7

Correct answer: B. 2 7

6 * 2 = 12 is 1 mod 11, so the inverse of 6 is 2. 4 * 7 = 28 is 1 mod 9, so the inverse of 4 is 7.

More Python Programming questions

Exams that ask this topic