This is mastery #22 explains when to use which type of repetition.

While: 

Now we start from zero,

and don’t try to be a hero,

repeats something as long as you want,

with that I’ll give you a hand.

You have to use a condition, 

if you want it could be addition, 

be careful because infinite it is, 

and of eaten cake it’s a piece.

For:

If you don’t wanna repeat that much,

this will help you, I have a hunch,

you just set a little parameter,

it’s not like running a kilometer.

just wait for it not to be true,

who couldn’t do this, tell me who?

Do While

Here we get to another part, 

I really feel it with my heart,

now we can set an end,

for the WSQs of Ken.

condition will be true or false,

you just can’t make no faults.

The infinity of while is gone,

don’t get me with your gun.

CC BY 4.0 This is mastery #22 explains when to use which type of… by lowercase is licensed under a Creative Commons Attribution 4.0 International License.