Computer Applications
Answer
A statement that allows a set of instructions to be performed repeatedly is known as a looping or iteration statement. Python provides looping statements in the form of for and while loop.
These statements enable a program to perform a set of instructions repeatedly. For example,
num = 3
while num > 0 :
print num
num = num - 1
Related Questions
What is the output of following code ?
while 3 >= 3 : print 3- 3 is printed once
- 3 is printed three times
- 3 is printed infinitely until program is closed
- Error in code
What are selection statements ? How are they useful ?
Differentiate between if and if-else statements.
Differentiate between for and while statements.