Completed

Python Fundamentals & Control Flow

Class 11 · Computer Science Mon, 30 Aug 2027 7: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 = 18
x += 4 * 3
x //= 5
x -= 2

print(x)
Correct output: 4
Q2mcq1 mark
Which of the following expressions evaluates to 17?
5 + 3 * 4 ✓
(5 + 3) * 2
20 - 3 ** 2
30 // 2 + 3
Q3output1 mark
What will be the output of the following Python code?
x = 10 > 3 and 10 % 3 == 1 or 3 == 3 and 10 < 5

print(x)
Correct output: True
Q4mcq1 mark
Which of the following statements about Python operator precedence is correct?
+ is evaluated before *
* is evaluated before **
** is evaluated before * ✓
// is always evaluated after +
Q5output1 mark
What will be the output of the following Python code?
a = input("Enter first number: ")
b = input("Enter second number: ")

print(int(a) + int(b))
print(a + b)

If the user enters:

12
8
Correct output: 20 128
Q6output1 mark
What will be the output of the following Python code?
x = 7
y = 2
x = x / y

print(type(x).__name__)
print(x)
Correct output: float 3.5
Q7mcq1 mark
What type of error occurs when the following statement is executed? x = 10 if x > 5 print(x)
Logical error
Runtime error
Syntax error ✓
No error
Q8output1 mark
What will be the output of the following Python code?
x = 15

if x % 3 == 0:
    x = x // 3

if x % 2 == 0:
    x = x + 5
else:
    x = x - 5

print(x)
Correct output: 10
Q9output1 mark
What will be the output of the following Python code?
n = 17

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

for i in range(2, 11, 2):
    if i % 4 == 0:
        continue
    total = total + i

print(total)
Correct output: 18
Q11mcq1 mark
Which statement correctly describes the effect of break in the following loop? for i in range(3, 10): if i > 6: break print(i)
It skips only the current iteration.
It terminates the loop completely. ✓
It restarts the loop from the beginning.
It terminates the entire Python program.
Q12output1 mark
What will be the output of the following Python code?
n = 29
count = 0

while n > 5:
    if n % 2 == 0:
        n = n // 2
    else:
        n = n - 5
    count = count + 1

    if n <= 3:
        break

print(n)
print(count)
Correct output: 3 4
Q13output1 mark
What will be the output of the following Python code?
x = 1

for i in range(1, 8):
    if i == 3:
        continue

    if i == 6:
        break

    x = x * i

print(x)
Correct output: 40
Q14mcq1 mark
Which statement about the identity operator is correct?
"is" checks whether two values are equal.
"is" checks whether two references refer to the same object. ✓
"is" is a membership operator.
"is not" can only be used with strings.
Q15output1 mark
What will be the output of the following Python code?
n = 1
total = 0

while n <= 10:
    n = n + 2

    if n % 3 == 0:
        continue

    total = total + n

    if total > 15:
        break

print(n)
print(total)
Correct output: 11 23
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...