ProgrammingVery hardTCS CodeVita · Infosys HackWithInfy
What is printed?
What is printed?
import math print(len(str(math.factorial(200))))
- A. 376
- B. 200
- C. 375
- D. 374
Correct answer: C. 375
200! is about 7.88 * 10^374, so it has 375 digits. The digit count is len(str(...)) with no need to count by hand.
More Python Programming questions
- What is printed? python import bisect print(bisect.bisectleft([1, 1, 1], 1), bisect.bisectright([1, 1, 1], 1))
- What is printed? python print(0.1 0.1 == 0.01, round(0.1 0.1, 2) == 0.01)
- What is printed? python print(list(filter(None, [0, 1, '', 'a', None, [], [0]])))
- What is printed? python x = 5 print(x.add(3), (5).bitlength(), 5 .real)
- What is printed? python print({{'a': 1, 'b': 2}, 'a': 3})
- What is printed? python a, b, c = [1, 2, 3, 4] print(a, b, c)