• In programming, loops are used to repeat a block of code until a specified condition is met.
• in looping, a program executes the sequence of statements many times until the stated condition becomes false.
• used to repeatedly execute a block of statements.
• For example: Suppose we want to print “Hello World” 10 times. This can be done in two ways as shown below:
one way: write the print statements in 10 times
print("xcode")
print("xcode")
print("xcode")
print("xcode")
.
.
and so on
second way: using loop we can achieve above thing with low amount code:
------------------------------------------------------------------------------------------------------------------
Thank you - Vikranth Apps