Completed

Flow Control & Loop Challenge

Class 11 · Computer Science Sun, 6 Sep 2026 4:30 PM 60s / question 15 questions · 15 marks

Questions From This Challenge

Q1output1 mark
What will be the output of the following Python code?
x = 5

for i in range(1, 5):
    if i == 3:
        continue
    x = x + i

print(x)
Correct output: 12
Q2output1 mark
What will be the output of the following Python code?
total = 0

for i in range(2, 8, 2):
    if i == 6:
        break
    total += i

print(total)
Correct output: 6
Q3mcq1 mark
Which statement correctly describes the effect of `pass` when it is encountered inside a loop?
It terminates the loop
It skips the remaining iterations of the loop
It does nothing and execution continues normally ✓
It skips the remaining statements of the program
Q4output1 mark
What will be the output of the following Python code?
for i in range(1, 4):
    for j in range(1, 4):
        if j == 2:
            continue
        print(i * j, end=" ")
Correct output: 1 3 2 6 3 9
Q5output1 mark
What will be the output of the following Python code?
n = 10

while n > 0:
    n -= 2
    if n == 4:
        break
    if n % 3 == 0:
        continue
    print(n, end=" ")
Correct output: 8 2
Q6mcq1 mark
What is the value of `x` after execution of the following code? x = 2 for i in range(1, 4): x *= i + 1
12
24 ✓
36
48
Q7output1 mark
What will be the output of the following Python code?
for i in range(3):
    for j in range(3):
        if i == j:
            print(i, end=" ")
Correct output: 0 1 2
Q8output1 mark
What will be the output of the following Python code?
x = 0

for i in range(1, 6):
    if i % 2 == 0:
        pass
    else:
        x += i

print(x)
Correct output: 9
Q9mcq1 mark
Which value of `n` will make the following condition evaluate to `True`? n % 3 == 0 and n % 5 != 0
10
15
18 ✓
20
Q10output1 mark
What will be the output of the following Python code?
for i in range(2, 5):
    for j in range(i):
        print(j, end=" ")
Correct output: 0 1 0 1 2 0 1 2 3
Q11output1 mark
What will be the output of the following Python code?
s = 0

for i in range(1, 6):
    if i == 2:
        continue
    if i == 5:
        break
    s += i

print(s)
Correct output: 8
Q12output1 mark
What will be the output of the following Python code?
for i in range(1, 4):
    for j in range(1, 4):
        if i + j == 4:
            break
        print(i + j, end=" ")
Correct output: 2 3 3
Q13mcq1 mark
Which statement will correctly produce the values 2 5 8 11 using `range()`?
range(2, 11, 3)
range(2, 12, 3) ✓
range(2, 11, 2)
range(2, 12, 2)
Q14output1 mark
What will be the output of the following Python code?
x = 0

for i in range(1, 4):
    for j in range(1, 4):
        if j == 2:
            pass
        x += i + j

print(x)
Correct output: 36
Q15output1 mark
What will be the output of the following Python code?
count = 0

for i in range(1, 5):
    for j in range(1, 5):
        if i == 3:
            break
        if j == 2:
            continue
        count += 1

print(count)
Correct output: 9
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...