Python Loop MCQs

Question 1: Which of the following statements is true regarding the body of the loop?

Question 2: Which of the following Python objects is not iterable?

Question 3: The range(5) function generates which of following sequence of numbers:

Question 4: What will be the output of the following code?

for char in 'Hello':
    print (char,end=",")

Question 5: The else keyword can be used along with which of the following?

Question 6: break statement causes

Question 7: continue statement causes

Question 8: What will be the output of the following code?

x = 0

while x < 3:
	x += 1 
	print(x,end='')
else:
    print('else block)