Vidyalelo
Python · Q24

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 24

Q24

What will the following code print:x = 5while x > 0: print(x) x -= 1

A.
5
4
3
2
1
Answer
B.
5
4
3
2
0
C.
1
2
3
4
5
D.
4
3
2
1
0

Answer: Option A

Solution

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