Aparna Dhirde
Quiz by , created more than 1 year ago

Quiz on Multiple Choice Questions, created by Aparna Dhirde on 13/03/2020.

64
0
0
Aparna Dhirde
Created by Aparna Dhirde about 6 years ago
Close

Multiple Choice Questions

Question 1 of 10

1

A loop that never ends is called a:

Select one of the following:

  • Continue loop

  • Infinite loop

  • Circle loop

  • None of these

Explanation

Question 2 of 10

1

Which of the following loop will continue infinitely?

Select one of the following:

  • while O:

  • while 1:

  • while :1:

  • while False:

Explanation

Question 3 of 10

1

We can go back to the start of the loop by using __________

Select one of the following:

  • loop

  • back

  • start

  • continue

Explanation

Question 4 of 10

1

The two types of loops used in Python are:

Select one of the following:

  • for

  • while

  • do while

  • Both for & while

Explanation

Question 5 of 10

1

Which of the following is a valid for loop in Python?.

Select one of the following:

  • for(i=0; i < n; i++)

  • for i in range(0,5):

  • for i in range(0,5)

  • for i in range(5)

Explanation

Question 6 of 10

1

Which of the following sequences would be generated by the given line of code? range (5,0,-2)

Select one of the following:

  • 5 4 3 2 1 0 -1

  • 5 4 3 2 1 0

  • 5 3 1

  • None of the above

Explanation

Question 7 of 10

1

When does the else statement written after loop executes?.

Select one of the following:

  • When break statement is executed in the loop

  • When loop condition becomes false

  • Else statement is always executed

  • None of the above

Explanation

Question 8 of 10

1

for loop in python are work on

Select one of the following:

  • range

  • iteration

  • Both of the above

  • None of the above

Explanation

Question 9 of 10

1

For loop in python is……..

Select one of the following:

  • Entry control loop

  • Exit control loop

  • Simple loop

  • None of the above

Explanation

Question 10 of 10

1

To break the infinite loop , which keyword we use ?

Select one of the following:

  • continue

  • break

  • exit

  • None of the above

Explanation