Advertisements
Advertisements
प्रश्न
Find the output of the following program segment:
a = 110
while a > 100:
print(a)
a -= 2टीपा लिहा
Advertisements
उत्तर
The value of ‘a’ is decreased by 2 on each iteration of the loop and when it reaches 100, the condition a >100 becomes false and the loop terminates.
OUTPUT:
110
108
106
104
102
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
