Python - Looping Statements
Questions No: 1/35

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: 2/35

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

Questions No: 3/35

What will be the output after the following statements?

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

Questions No: 4/35

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: 5/35

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: 6/35

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

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

Questions No: 7/35

What will be the output of the following Python code?

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

Questions No: 8/35

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

Questions No: 9/35

What will be the output of the following Python code?

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

Questions No: 10/35

What will be the output of the following Python code?

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

Questions No: 11/35

What will be the output of the following Python code?

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

Questions No: 12/35

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: 13/35

What is the output of the following code?

for i in range(3):
print(i,end=" ")

Questions No: 14/35

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: 15/35

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

Questions No: 16/35

What will be the output of the following Python code?

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

Questions No: 17/35

What is the output of the following code?

count=0
while count<3:
print(count,end=" ")
count+=1

Questions No: 18/35

What will be the output after the following statements?

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

Questions No: 19/35

What will be the output of the following Python code?

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

Questions No: 20/35

What will be the output of the following Python code?

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

Questions No: 21/35

What will be the output of the following Python code?

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

Questions No: 22/35

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: 23/35

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: 24/35

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: 25/35

What is the output of the following program:

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

Questions No: 26/35

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

Questions No: 27/35

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: 28/35

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

Questions No: 29/35

What will be the output of the following Python code?

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

Questions No: 30/35

What will be the output of the following Python code?

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

Questions No: 31/35

What value does the following expression evaluate to ?

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

Questions No: 32/35

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

Questions No: 33/35

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

Questions No: 34/35

What will be the output of the following Python code?

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

Questions No: 35/35

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