Completed

Iterative Statements

Class 11 · Computer Science Sun, 11 Oct 2026 8:00 PM 60s / question 15 questions · 15 marks

Questions From This Challenge

Q1mcq1 mark
What is the output of the following code? total = 0 for i in range(1, 5): total = total + i print(total)
10 ✓
15
4
9
Q2mcq1 mark
What is the output of the following code? i = 1 count = 0 while i <= 10: count += 1 i += 2 print(count)
5 ✓
10
4
6
Q3mcq1 mark
What is the output of the following code? count = 0 for i in range(1, 13, 3): count += 1 print(count)
4 ✓
5
3
6
Q4mcq1 mark
What is the output of the following code? n = 3 result = 1 while n > 0: result = result * n n -= 1 print(result)
6 ✓
3
1
0
Q5mcq1 mark
What is the output of the following code? total = 0 for i in range(2, 6): total += i print(total)
14 ✓
10
6
20
Q6mcq1 mark
What is the output of the following code? i = 2 count = 0 while i <= 20: count += 1 i += 3 print(count)
7 ✓
6
8
5
Q7output1 mark
What is the output?
for i in range(1, 4):
    print(i * i)
Correct output: 1 4 9
Q8output1 mark
What is the output?
n = 5
total = 0
while n > 0:
    total += n
    n -= 1
print(total)
Correct output: 15
Q9output1 mark
What is the output?
for i in range(5, 0, -1):
    print(i)
Correct output: 5 4 3 2 1
Q10output1 mark
What is the output?
i = 1
while i <= 10:
    if i % 2 != 0:
        print(i)
    i += 1
Correct output: 1 3 5 7 9
Q11output1 mark
What is the output?
total = 0
for i in range(3, 15, 4):
    total += i
    print(total)
Correct output: 3 10 21
Q12output1 mark
What is the output?
x = 1
i = 1
while i <= 5:
    x = x * 2
    i += 1
print(x)
Correct output: 32
Q13output1 mark
What is the output?
count = 0
for i in range(1, 20):
    if i % 3 == 0:
        count += 1
print(count)
Correct output: 6
Q14output1 mark
What is the output?
n = 100
while n > 10:
    n = n - 15
print(n)
Correct output: 10
Q15output1 mark
What is the output?
total = 0
for i in range(1, 6):
    total = total + i * 2
print(total)
Correct output: 30
Next Live Challenge
Mixed: Tuples + Dictionary + Modules
Class 11 · Computer Science Fri, 23 Oct 2026, 8:00 PM
View Live Challenges →

← Back to Live Challenge History · Practice MCQs

CodeBuddy
Hi there! 👋 I'm CodeBuddy, your KV Coders assistant.

To help me give you the most accurate answers, please select your class and subject below, or just type your question!
Buddy is typing...