Help me in solving PYTH110 problem

My issue

plz explain

Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone

The code will print python for all the even numbers lesser than 5 but when u will reach program , before u are going to print python for i=4 u break the loop so for i=4 it won’t print python .
for it will print for i=0,2 .Thus answer will be 2 times.

1 Like

The question asks for how many i the output will be python if after every loop i is incremented by 2. The answer will be 2 because the code will print python for i=0(first iteration) and i=2(second iteration) . But in the 3rd iteration the value of i will be 4 and it will break the loop.

1 Like