Zusammenfassung der Ressource
Frage 1
Frage
A loop that never ends is called a:
Antworten
-
Continue loop
-
Infinite loop
-
Circle loop
-
None of these
Frage 2
Frage
Which of the following loop will continue infinitely?
Antworten
-
while O:
-
while 1:
-
while :1:
-
while False:
Frage 3
Frage
We can go back to the start of the loop by using __________
Frage 4
Frage
The two types of loops used in Python are:
Antworten
-
for
-
while
-
do while
-
Both for & while
Frage 5
Frage
Which of the following is a valid for loop in Python?.
Antworten
-
for(i=0; i < n; i++)
-
for i in range(0,5):
-
for i in range(0,5)
-
for i in range(5)
Frage 6
Frage
Which of the following sequences would be generated by the given line of code? range (5,0,-2)
Antworten
-
5 4 3 2 1 0 -1
-
5 4 3 2 1 0
-
5 3 1
-
None of the above
Frage 7
Frage
When does the else statement written after loop executes?.
Antworten
-
When break statement is executed in the loop
-
When loop condition becomes false
-
Else statement is always executed
-
None of the above
Frage 8
Frage
for loop in python are work on
Antworten
-
range
-
iteration
-
Both of the above
-
None of the above
Frage 9
Frage
For loop in python is……..
Antworten
-
Entry control loop
-
Exit control loop
-
Simple loop
-
None of the above
Frage 10
Frage
To break the infinite loop , which keyword we use ?
Antworten
-
continue
-
break
-
exit
-
None of the above