LOOP
In computer science, a loop
is a programming structure that repeats a sequence of instructions
until a specific condition is met.
Example:
Let’s take a
situation where somebody has to log into an account with a registered username
and password.
When the
password entered does not match the registered password, mostly an error
message displays and asks the user to re-enter the password. This repeats
itself until the correct username or password is entered.
The repetition
of the error message until the correct input is made, is as a result of the
looping.
There are
three types of loops in programming:
1.
The
while loops
2.
For
loops
3.
Do
-while loops
You can read
more on the types loops by clicking on the specific type in the drop down
0 Comments