Post

@PythonPr Answer: A
Solution: The main part is to figure out what the loop is over.
range(0, 5, 2) produces a sequence of numbers
- starting from 0
- up to, but excluding 5
- with increments of 2
So, the items in the range are: 0, 2, 4.
Note that 6 won't be in there, as it's >=5.
+
English

@PythonPr So, i takes values 0, 2, 4 within the loop.
x is initialized to 0.
In the 1st iteration, i=0 is added to x. It remains 0.
In the 2nd iteration, i=2 is added to x, making it 2.
In the 3rd iteration, i=4 is added to x, making it 6.
The loop ends.
The value of x, 6 is printed.
English

