ProgrammingHardTCS NQT · Wipro pattern

What is printed?

What is printed?
import math
print(sum(map(int, str(math.factorial(10)))))
  1. A. 27
  2. B. 26
  3. C. 28
  4. D. 30

Correct answer: A. 27

10! is 3628800, and its digits 3, 6, 2, 8, 8, 0, 0 add up to 27.

More Python Programming questions

Exams that ask this topic