January 2019
Beginner to intermediate
776 pages
19h 58m
English
A loop, as we know in common language, is circling the same path over and over again. In other words, if I am asked to fetch five ice creams from the ice cream store, and I can carry only one ice cream at a time, I will repeat the process of going to the ice cream shop to purchase ice cream five times. Correlating this with programming, if the same set of instructions need to be performed multiple times, then we put those instructions inside a loop.
A very basic loop is generally depicted as an iteration of a variable as many times as we want the instructions to be carried out.
Let's take an example:
Start the loop from one, until the loop has been repeated sixty times, adding a value of 1 to the loop:Perform action
If you see the instructions ...
Read now
Unlock full access