New course! Every coder should learn Generative AI!
Try a free lesson+ 1
When 4 is printed,in the next line i value become 5 so if statement will execute and it will break out of the while loop. So value 5 is not printed. If you print the i value after while loop,it will be 5