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

Posted Date:-2019-06-05 01:01:37


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

1.0

2.1

3.2

4.3

Posted Date:-2019-06-05 01:03:08


Question:
for loop in python are work on

1.range

2.iteration

3.Both of the above

4.None of the above

Posted Date:-2019-06-04 05:05:30


Question:
For loop in python is 

1.Entry control loop

2.Exit control loop

3.Simple loop

4.None of the above

Posted Date:-2019-06-04 05:14:06


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

1.101

2.99

3.100

4.0

Posted Date:-2019-06-04 05:19:51


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

Posted Date:-2019-06-05 01:06:02


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

1.Yes

2.No

3.Sometimes

4.None of the above

Posted Date:-2019-06-05 01:09:11


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

1.[]

2.list

3.print()

4.None of the above

Posted Date:-2019-06-04 05:22:36


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

1.continue

2.break

3.exit

4.None of the above

Posted Date:-2019-06-04 05:14:55


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

Posted Date:-2019-06-04 05:21:01


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

Posted Date:-2019-06-04 05:21:41


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

1.semicolon

2.colon

3.comma

4.None of the above

Posted Date:-2019-06-04 05:11:14


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

Posted Date:-2019-06-04 05:18:04


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

Posted Date:-2019-06-05 01:04:10


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

1.for

2.while

3.do while

4.1 and 2

Posted Date:-2019-06-04 05:04:48


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

Posted Date:-2019-06-05 01:07:35


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

Posted Date:-2019-06-05 01:06:54


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

1.0

2.1

3.3

4.infinite

Posted Date:-2019-06-05 01:00:08


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

1.1

2.2

3.3

4.None of the above

Posted Date:-2019-06-05 00:59:37


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

1.0

2.1

3.3

4.infinite

Posted Date:-2019-06-05 01:01:03


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
Search
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!