Vidyalelo
Python · Q50

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 50

Q50

What will be the output of the following Python code snippet? x = 2 for i in range(x): x -= 2 print (x)

A.
0 1 2 3 4 ...
B.
0 -2
Answer
C.
0
D.
error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board