Question 1
Which loop statement in python is used when the number of interations is known in advance?
Question 2
What is the purpose of the continue keyword in a loop?
Question 3
Which loop statement in python is used to iterate indefinitely until a certain condition is met?
Question 4
What is the purpose of the break keyword in a loop?
Question 5
Which iterative statement in python in used to execute a block of code repeatedly as long as condition is true?
Question 6
What will be the output of the following code?
for i in range(5):
print(i, end=)
Question 7
Which loop statement in python is used to iterate over a sequence (such as list or a string)?
Question 8
What will be the output of the following code?
x=0
while x<5:
print(x, end=)
x +=1
Question 9
What is the purpose of the range function in a for loop?
Question 10
What is the purpose of the else clause in loop?