How many times is the following loop executed?
i = 100
while (i<=200):
print i
i + =20
Answers
Answered by
2
Is this programming language is Python?
If yes then the answer is 6 times.
Because at the first time the value of i is 100 which is not equal to 200.
So then we add 20 to it till the value of i reaches to 200.
If yes then the answer is 6 times.
Because at the first time the value of i is 100 which is not equal to 200.
So then we add 20 to it till the value of i reaches to 200.
Similar questions
Chemistry,
4 months ago
Economy,
4 months ago
Social Sciences,
4 months ago
Political Science,
8 months ago
World Languages,
8 months ago
Science,
1 year ago
Math,
1 year ago
Geography,
1 year ago