Python/Python MCQS - loops in python Sample Test,Sample questions

Question:
for i in range(-3), how many times this loop will run ?

1.0

2.1

3.Infinite

4.Error


Question:
for i in [1,2,3]:, how many times a loop run ?

1.0

2.1

3.2

4.3


Question:
for loop in python are work on

1.range

2.iteration

3.Both of the above

4.None of the above


Question:
For loop in python is 

1.Entry control loop

2.Exit control loop

3.Simple loop

4.None of the above


Question:
How many times it will print the statement ?, for i in range(100): print(i)

1.101

2.99

3.100

4.0


Question:
In which of the following loop in python, we can check the condition ?

1.for loop

2.while loop

3.do while loop

4.None of the above


Question:
It is possible to create a loop using goto statement in python ?

1.Yes

2.No

3.Sometimes

4.None of the above


Question:
l=[],for i in l: print(l), what is the output ?

1.[]

2.list

3.print()

4.None of the above


Question:
To break the infinite loop , which keyword we use ?

1.continue

2.break

3.exit

4.None of the above


Question:
What is the final value of the i  after this, for i in range(3): pass

1.1

2.2

3.3

4.0


Question:
What is the value of i after the for loop ?, for i in range(4):break

1.1

2.2

3.3

4.0


Question:
What we put at the last of the loop ?

1.semicolon

2.colon

3.comma

4.None of the above


Question:
which of the following is consider as a infinite loop ?

1.while(infinte):

2.while(1):

3.for(1):

4.None of the above


Question:
Which of the following is Exit control loop in python ?

1.for loop

2.while loop

3.do while loop

4.None of the above


Question:
Which of the following is the loop in python ?

1.for

2.while

3.do while

4.1 and 2


Question:
Which of the following loop is not supported by the python programming language ?

1.for loop

2.while loop

3.do while loop

4.None of the above


Question:
Which of the following loop is work on the particular range in python ?

1.for loop

2.while loop

3.do while loop

4.recursion


Question:
While(0), how many times a loop run ?

1.0

2.1

3.3

4.infinite


Question:
while(1): print(2), How many times a loops run ?

1.1

2.2

3.3

4.None of the above


Question:
while(1==3):, how many times a loop run ?

1.0

2.1

3.3

4.infinite


More MCQS

  1. Python MCQS - Function
  2. Python MCQS - GUI in python
  3. Python MCQS - Operators
  4. Python MCQS - Data type in python
  5. Python MCQS - loops in python
  6. Python MCQS - Numpy
  7. Python MCQS - sqlite3
  8. Python MCQS - Library
  9. Python MCQS - Pandas
  10. Python MCQs
  11. Dictionary Python MCQ set 1
  12. Dictionary Python MCQ set 2
  13. MCQ For Python Fundamentals
  14. MCQ Introduction to Python Section 1
  15. MCQ Introduction to Python Section 2
  16. MCQ Introduction to Python Section 3
  17. MCQ on Flow of Control in Python Set 1
  18. MCQ on Flow of Control in Python Set 2
  19. MCQ on Python String Set 1
  20. File Handling in Python section 1
  21. File Handling in Python section 2
  22. Python Functions MCQS Set 1
  23. Python Functions MCQS Set 2
  24. MCQ on List in Python
  25. Pandas MCQ Questions Set 1
  26. Pandas MCQ Questions Set 2
  27. Tuple MCQ in Python
  28. Python dataframe MCQ
  29. Python Mcq Set 1
  30. Python Mcq Set 2
  31. Python Mcq Set 3
  32. Python Mcq Set 4
  33. Python Mcq Set 5
  34. Python Mcq Set 6
  35. Python Mcq Set 7
  36. Python Mcq Set 8
  37. Python Mcq Set 9
  38. Python Mcq Set 10
  39. Python Mcq Set 11
  40. Python Mcq Set 12
  41. Python Mcq Set 13
  42. Python Mcq Set 14
  43. Python Mcq Set 15
  44. Python Mcq Set 16
  45. Python Mcq Set 17
  46. Python Mcq Set 18
  47. Python Mcq Set 19
  48. Python Mcq Set 20
  49. Python Mcq Set 21
  50. Python MCQ
  51. Python MCQ Questions with Answer
  52. Python Practice Papers
  53. python mcq question and answer
  54. Test
Learn Python MCQS - loops in python,Learn Python Objetive choice questions and answers,Python Multiple choice questions and answers,Python objective, Python questions , Python answers,Python MCQs questions and answer
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!