One of the most basic and powerful programming concepts is Loops. We can simply introduce a loop as a set of statements. It repeats until a specified condition is reached in a computer program. The loop poses a question in a loop form. If the response needs intervention, it will be executed. Until no further action is taken, the same question is asked again and again. It’s called an iteration any time the question is asked.

Consider we need to use the same line of code many times in a program. …

Kavishka Heshan

Undergraduate at University of Moratuwa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store