CBSE Class 12 Computer Science
Question 61 of 120
Review of Python Basics — Question 13
Back to all questions15
The code sets up a for loop that iterates over a range of numbers from 10 to 19. During each iteration, the variable x takes on these values sequentially. Within the loop, an if statement checks if x is equal to 15. When x reaches 15, the condition is met, and the break statement is executed, immediately exiting the loop. As a result, the loop terminates prematurely, and the value of x at the point of exit, which is 15, is printed.