--Originally published at Programming Fundaments
This is a simple one: we are going to define when to use wichtype of loop, so we are going to make it a brief one.
If you are going to use a list of varios result you can use the “for” loop. While (no pun intended) you can use “while” loop to make a result reapeat until this one is false. There is it!