ProgrammingModerateProduct-company MCQ pattern
What is printed on the first line?
What is printed on the first line?
import math print(math.factorial(20) == 2432902008176640000, len(str(math.factorial(25)))) print(math.factorial(25) % 10**6, sum(map(int, str(math.factorial(10)))))
- A. True 25
- B. False 26
- C. True 26
- D. True 27
Correct answer: C. True 26
25! has 26 digits, and 20! equals 2432902008176640000. Python integers never overflow, so the exact value is available.
More Python Programming questions
- What is printed on the first line? python n = 264 print(n, n.bitlength(), hex(n - 1), oct(8), bin(5)) print(int(hex(n)[2:], 16) == n, -263…
- What is printed on the first line? python print(int('1' 19) + 1, 1018 10, 9223372036854775807 + 1 > 263 - 1) print(2100 // 298, (2100) >>…
- What is printed? python print(0b1111 ^ 0b1010 & 0b0110, (0b1111 ^ 0b1010) & 0b0110, 6 & 3 | 4 ^ 1)
- What is printed? python print(1 << 2 + 1, (1 << 2) + 1, 4 >> 1 - 1, 2 3 % 4 2 // 3)
- What is printed on the first line? python print(0.5 + 0.25 == 0.75, 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 == 1.0)…
- What is printed? python print(round(0.5), round(1.5), round(2.5), round(-2.5), round(2.5 + 1e-15))