Question 21 - Week 4 Practice | Prasnya
Prasnya
Continue with Google
Practice path
Dashboard
Exam
Qualifier / Quiz 1
Go to subject
Programing with python
Go to chapter
Week 4
Question 21
00:00
Est. 2 min
Marks:
+4.00
0.00
If `n` is a positive integer, what is the output of the following code? Assume that natural numbers start from
1
1
, that is,
0
0
is not a natural number. ``` a = n for i in range(1, n): a = a + i b = a for j in range(1, a): b = b * j print(b) ```
Single correct
Medium Difficulty
16 October 2022
A
Sum of the factorial of the first
n
ā
1
n - 1
natural numbers
B
Factorial of the sum of the first
n
ā
1
n - 1
natural numbers
C
Sum of the factorial of the first
n
n
natural numbers
D
Factorial of the sum of the first
n
n
natural numbers