Post

@PythonPr Answer: 10 14
Why:
Start num = 10 → printed
num += 4 → 14 → printed
num += 4 → 18 → break runs before printing
So 18 is never printed.
English

@PythonPr 10 14
When 18 comes it will break the condition and will come out from the while loop .
English

@PythonPr Answer: 10 14
Explanation;
The code is a Python while loop that iterates until the condition num < 20 is met or a break statement is encountered [1.1].
num is initialized to 10.
The while loop starts. Since 10 < 20 is true, it prints the current value of num, which is 10.
English

@PythonPr A. 10 14.
REASON:
when num = 10 it prints 10.
When num = num + 4 = 10 + 4 = 14.
When num = num + 4 = 14 + 4 = 18. At this point, the if block of the code comes into play and the code breaks because at this point, num == 18.
Therefore the only output to be printed is 10 14.
English

@PythonPr 10 14, while the number does reach 18. It never prints because it hits the line where it breaks
English

@PythonPr 10,14 since num != 18. It will break before printing 18.
English































