What is the purpose of "assert i % 3 == 2 : i;" statement ?
The program only expects 3 values of i:
3 (i%3==0),
4 (i%3==1), &
5 (i%3==2). Any other values should not exist.
So what the program is saying is, if the 1st two conditions are not satisfied, then i must be 5. And the assert statement makes sure that it is before it continues with the rest of the code.
It is like writing the program like this: