ProgrammingModerateProduct-company MCQ pattern

What is printed on the second line?

What is printed on the second line?
import math
print(math.gcd(12, 18, 24), math.gcd(), math.lcm(), math.lcm(4, 0, 9))
print(math.isqrt(99), math.isqrt(100), int(99 ** 0.5))
  1. A. 9 10 9
  2. B. 9 10 10
  3. C. 9 9 9
  4. D. 8 10 9

Correct answer: A. 9 10 9

isqrt returns the floor of the exact square root, so isqrt(99) is 9 and isqrt(100) is 10. int(99 ** 0.5) also gives 9 because 99 ** 0.5 is about 9.95.

More Python Programming questions

Exams that ask this topic