Completed

Python Fundamentals, Logic & Loop Master Challenge

Class 11 · Computer Science Sat, 12 Sep 2026 2: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 = 7
y = 3
x += y * 2
y = x - y
print(x, y)
Correct output: 13 10
Q2mcq1 mark
Which of the following correctly identifies the l-value and r-value in the statement below? x = 25
x is r-value and 25 is l-value
x is l-value and 25 is r-value ✓
Both x and 25 are l-values
Both x and 25 are r-values
Q3output1 mark
What will be the output of the following Python code?
a = 5
b = 10
c = 15

print(a < b and b < c or c < a)
Correct output: True
Q4output1 mark
What will be the output of the following Python code?
s = "PYTHON"
print(s[1:5])
print(s[-3:])
print("TH" in s)
Correct output: YTHO HON True
Q5output1 mark
What will be the output of the following Python code?
x = 2 + 3 * 4 ** 1
y = (x - 5) // 3
print(x, y)
Correct output: 14 3
Q6output1 mark
What will be the output of the following Python code?
s = "AB"
print(s * 3 + "C")
print("A" in s and "C" not in s)
Correct output: ABABABC True
Q7output1 mark
What will be the output of the following Python code?
n = 29

if n % 2 == 0:
    print("A")
elif n % 3 == 0:
    print("B")
elif n % 5 == 0:
    print("C")
else:
    print("D")
Correct output: D
Q8output1 mark
What will be the output of the following Python code?
total = 0

for i in range(1, 7):
    if i == 3:
        continue
    if i == 6:
        break
    total += i

print(total)
Correct output: 12
Q9output1 mark
What will be the output of the following Python code?
for i in range(2, 5):
    for j in range(1, 4):
        print(i + j, end=" ")
Correct output: 3 4 5 4 5 6 5 6 7
Q10output1 mark
What will be the output of the following Python code?
x = 1

for i in range(1, 5):
    x = x * i
    if x > 5:
        break

print(x, i)
Correct output: 6 3
Q11output1 mark
What will be the output of the following Python code?
n = 1
total = 0

while n <= 10:
    if n % 3 == 0:
        n += 2
        continue
    total += n
    n += 1

print(total)
Correct output: 31
Q12mcq1 mark
Which of the following statements will produce the sequence 10, 7, 4, 1 using range()?
range(10, 1, -3)
range(10, 0, -3) ✓
range(10, 1, 3)
range(10, -1, -3)
Q13output1 mark
What will be the output of the following Python code?
s = "COMPUTER"
count = 0

for ch in s:
    if ch in "AEIOU":
        count += 1

print(count)
Correct output: 3
Q14output1 mark
What will be the output of the following Python code?
x = 10

if x > 5:
    if x < 8:
        print("A")
    elif x == 10:
        print("B")
    else:
        print("C")
else:
    print("D")
Correct output: B
Q15output1 mark
What will be the output of the following Python code?
s = "PYTHON"
result = ""

for i in range(len(s) - 1, -1, -2):
    result += s[i]

print(result)
Correct output: NHY
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...