The while loop consists of a block of code and a condition. The condition is checked first and if it returns true then the specified code inside while Loop executes, this happens repeatedly until the condition returns false. When the condition returns false, the control comes out of the Loop and jumps to the next statement in the program after the while loop. It is very helpful in doing repetitive tasks. Loops within Loops, known as nested Loops also come in very handy. There is no restriction imposed on defining any number of Loops. The nesting level can be defined at n times. It can be written in any language, i.e., C++, C, Java, Python, etc. with the same meaning however different syntax.