That's a horrible way to teach a do-while loop. Sigh. I guess the author(s) can justify it saying that you wouldn't GET to the do-while loop unless you submitted the form that created children, but still!!!
Hope you're at least picking up how do-while, while, and for loops work. Let me know if you have any questions!