Computer Applications
What is the output of following code ?
while 3 >= 3 :
print 3
- 3 is printed once
- 3 is printed three times
- 3 is printed infinitely until program is closed
- Error in code
Python Control Flow
2 Likes
Answer
3 is printed infinitely until program is closed
Reason — Since the given condition (3 >= 3) will always remain true, the while loop will execute indefinitely and keep on printing 3 on the output screen till the program is closed.
Answered By
2 Likes