Quiz
Multiple Choice Questions
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (10)
1A loop that never ends is called a:
- AContinue loop
- BInfinite loop
- CCircle loop
- DNone of these
2Which of the following loop will continue infinitely?
- Awhile O:
- Bwhile 1:
- Cwhile :1:
- Dwhile False:
3We can go back to the start of the loop by using __________
- Aloop
- Bback
- Cstart
- Dcontinue
4The two types of loops used in Python are:
- Afor
- Bwhile
- Cdo while
- DBoth for & while
5Which of the following is a valid for loop in Python?.
- Afor(i=0; i < n; i++)
- Bfor i in range(0,5):
- Cfor i in range(0,5)
- Dfor i in range(5)
6Which of the following sequences would be generated by the given line of code? range (5,0,-2)
- A5 4 3 2 1 0 -1
- B5 4 3 2 1 0
- C5 3 1
- DNone of the above
7When does the else statement written after loop executes?.
- AWhen break statement is executed in the loop
- BWhen loop condition becomes false
- CElse statement is always executed
- DNone of the above
8for loop in python are work on
- Arange
- Biteration
- CBoth of the above
- DNone of the above
9For loop in python is……..
- AEntry control loop
- BExit control loop
- CSimple loop
- DNone of the above
10To break the infinite loop , which keyword we use ?
- Acontinue
- Bbreak
- Cexit
- DNone of the above
Information
- Description
- Quiz on Multiple Choice Questions, created by Aparna Dhirde on 13/03/2020.
- Author
- Aparna Dhirde
- Language
- English
- Views
- 64
- Tags
- Rating
- No ratings yet Rate this quiz