write the output of the following
(i) for x in range (10,20) if (x%2 ==0) continue print x
Answers
Answered by
10
Answer:
11
13
15
17
19
Explanation:
Here, range function returns a sequence of numbers, starting from 10 and increments by 1.
So, initially x will be 10, and it increments at each iteration (till x<20).
Now for the statement:
if(x%2==0)
{
continue;
}
Here, if x is an even number, then we just continue (Execution control goes to the beginning of the loop) and nothing gets printed.
All other values are printed
Similar questions
English,
4 months ago
Environmental Sciences,
4 months ago
Computer Science,
4 months ago
Chemistry,
8 months ago
History,
1 year ago
Physics,
1 year ago