Python - Looping Statements
Questions No: 1/36

What value does the following expression evaluate to ?

x = 5
while x < 10:
 print(x, end='')

Questions No: 2/36

What will be the output of the following Python code?

i = 2
while True:
    if i%3 == 0:
        break
    print(i)
    i += 2

Questions No: 3/36

What will be the output of the following Python code?

x = 'abcd'
for i in range(x):
    print(i)

Questions No: 4/36

What will be the output of the following Python code?

i = 0
while i < 3:
    print(i)
    i += 1
else:
    print(0)

Questions No: 5/36

The for loop in Python is an ____ .
पॉयथन में फॉर लूप...... है ।

Questions No: 6/36

If the else statement is used with a while loop, the else statement is executed when the condition becomes _____ .
यदि else स्टेटमेंट का प्रयोग 'व्हाइल' लूप के साथ किया जाता है, तो else स्टेटमेंट तब निष्पादित होता है जब कंडीशन हो जाती है।

Questions No: 7/36

___ in Python is a counter-controlled loop.
पायथन में काउन्टर कन्ट्रोल्ड लूप है ।

Questions No: 8/36

How many times will loop run? for a in "56247839"
लूप कितनी बार चलेगा? for a in "56247839"

Questions No: 9/36

What will be the output of the following Python code snippet?

 x = 'abcd'
for i in range(len(x)):
    x = 'a'
    print(x)

Questions No: 10/36

What will be the output of the following Python code?

x = 'abcd'
for i in range(len(x)):
    print(i)

Questions No: 11/36

What will be the output of the following Python code?

x = "abcdef"
i = "a"
while i in x:
    print(i, end = " ")

Questions No: 12/36

What will be the output of the following Python code?

x = 'abcd'
for i in range(len(x)):
    print(i.upper())

Questions No: 13/36

What will be the output of the following Python code?

for i in range(0):
    print(i)

Questions No: 14/36

What will be the output of the following Python code?

for i in range(5):
    if i == 5:
        break
    else:
        print(i)
else:
    print("Here")

Questions No: 15/36

What will be the output of the following Python code?

for i in range(2.0):
    print(i)

Questions No: 16/36

What will be the output of the following Python code?

 x = "abcdef"
i = "a"
while i in x:
    print('i', end = " ")

Questions No: 17/36

What will be the output of the following Python code snippet?

x = 2
for i in range(x):
    x += 1
    print (x)

Questions No: 18/36

What will be the output of the following Python code?

x = "abcdef"
i = "i"
while i in x:
    print(i, end=" ")

Questions No: 19/36

What will be the output after the following statements?

a = 0
b = 3
while a + b < 8:
       a += 1
       print(a, end='')

Questions No: 20/36

What will be the output of the following Python code?

i = 0
while i < 5:
    print(i)
    i += 1
    if i == 3:
        break
    else:
        print(0)

Questions No: 21/36

What will be the output of the following Python code?

i = 1
while False:
    if i%2 == 0:
        break
    print(i)
    i += 2

Questions No: 22/36

What will be the output after the following statements?

for i in range(1,6):
    print(i, end='')
    if i == 3:
        break

Questions No: 23/36

The contents inside the "for loop" are separated by?
लूप के अंदर की सामग्री को _____ द्वारा अलग किया जाती है?

Questions No: 24/36

What will be the output of the following Python code?

i = 1
while True:
    if i%2 == 0:
        break
    print(i)
    i += 2

Questions No: 25/36

What will be the output of the following Python code?

i = 1  
while True:      
	if i%3 == 0:          
		break      
	print(i)         
	i + = 1	

Questions No: 26/36

What will be the output of the following Python code?

i = 1
while True:
    if i%7 == 0:
        break
    print(i)
    i += 1

Questions No: 27/36

A loop block in python starts with a.. -
पायथन में एक लूप ब्लॉक एक... से शुरू होता है

Questions No: 28/36

Which is the most comfortable loop?
सबसे सरल लूप कौन सा है?

Questions No: 29/36

What is the output of the following program:

i = 0
while i < 3:
    print (i)
    i=i+1
    print (i+1)

Questions No: 30/36

What will be the output of the following Python code?

d = {0: 'a', 1: 'b', 2: 'c'}
for x in d.values():
    print(d[x])

Questions No: 31/36

What will be the output of the following Python code?

x = ['ab', 'cd']  
for i in x:      
    x.append(i.upper())  
print(x)

Questions No: 32/36

Operations to be repeated a certain number of times are done by
संक्रियाओं को एक निश्चित संख्या में बार-बार दोहराए जाने के द्वारा किया जाता है

Questions No: 33/36

What will be the output of the following Python code snippet?

x = 'abcd'
for i in range(len(x)):
    i.upper()
print (x)

Questions No: 34/36

What will be the output of the following Python code?

for i in range(int(2.0)):
    print(i)

Questions No: 35/36

What will be the output of the following Python code snippet?

x = 'abcd'
for i in range(len(x)):
    print(x)
    x = 'a'

Questions No: 36/36

What will be the output of the following Python code?

x = "abcdef"
while i in x:
    print(i, end=" ")