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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
