Refer to CBSE Class 12 Computer Science For Loop in Python MCQs provided below available for download in Pdf. The MCQ Questions for Class 12 Computer Science with answers are aligned as per the latest syllabus and exam pattern suggested by CBSE, NCERT and KVS. Multiple Choice Questions for For Loop in Python are an important part of exams for Class 12 Computer Science and if practiced properly can help you to improve your understanding and get higher marks. Refer to more Chapter-wise MCQs for CBSE Class 12 Computer Science and also download more latest study material for all subjects
MCQ for Class 12 Computer Science For Loop in Python
Class 12 Computer Science students should refer to the following multiple-choice questions with answers for For Loop in Python in Class 12.
For Loop in Python MCQ Questions Class 12 Computer Science with Answers
Question. The for loop in Python is an _____________
a) Entry Controlled Loop
b) Exit Controlled Loop
c) Both of the above
d) None of the above
Answer : A
Question. Which of the following loop is not supported by the python programming language?
a) for loop
b) while loop
c) do…while loop
d) None of the above
Answer : C
Question. Which of the following is True regarding loops in Python?
a) Loops should be ended with keyword “end”.
b) No loop can be used to iterate through the elements of strings.
c) continue is used to continue with the remaining statements inside the loop.
d) break can be used to bring control out of the current loop.
Answer : D
Question. I wants to continuously check for a correct answer each time user enters a value, what loop would I use?
a) for loop
b) while loop
Answer : B
Question. Why is iteration important?
a) It determines the order in which instructions are carried out
b) It allows multiple paths through a program
c) It allows code to be simplified by removing repeated steps
d) It ensures the code works correctly
Answer : C
Question. Write the output of the following Python code:
for i in range(2,7,2):
print(i * ‘$’)
a) 2$
4$
6$
b) $$
$$$$
$$$$$$
c) 2$4$6$
d) None of the above
Answer : B
Question. Find the output of the following program segments:
country = ‘INDIA’
for i in country:
print (i, end=”)
a) INDIAN
b) INDIA
c) INDI
d) INDIAS
Answer : B
Question. How many times the message Hello will appear when this loop runs?
while(0):
print(‘Hello’)
a) Not at all
b) Only once
c) Two times
d) Infinite times
Answer : A
Question. Which of the following is not true for the for statement in Python?
a) The statements within the body of for loop are executed till the range of values is exhausted
b) for loop iterates over the range or sequence.
c) for loop cannot be nested.
d) break statement is used to terminate a for loop without completing its iteration.
Answer : C
Question. range(3) in Python is equivalent to:
a) range(0,3,1)
b) range(1,4,1)
c) range(1,3)
d) range(1,3,0)
Answer : A
Question. What is the result of executing the following code?
count = 10
while count <= 10:
if count < 10:
count = count + 1
print(count)
a) The program will loop indefinitely
b) The value of number will be printed exactly 1 time
c) The while loop will never get executed
d) The value of number will be printed exactly 5 times
Answer : A
Question. A loop block in python starts with a –
a) ; (semicolon)
b) , (comma)
c) : (colon)
d) # (hash)
Answer : C
Question. Which of the following is False regarding loops in Python?
a) Loops are used to perform certain tasks repeatedly.
b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.
c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.
d) for loop can be used to iterate through the elements of lists.
Answer : C
Question. What is another word for ‘iteration’ ?
a) Selection
b) Assignment
c) Sequencing
d) Repetition
Answer : D
Question. To access a list which contains ten elements, which of the following uses of range() would produce a list of the desired indexes?
a) range(1,10)
b) range(0,9)
c) range(10)
d) range(1,11)
Answer : C
Question. Find and write the output of the following python code:
x = “abcdef”
i = “a”
while i in x:
print(i, end = ” “)
a) a
b) a a a a a a
c) a a a a a a … infinite times
d) Code will generate error
Answer : C
Question. Find the output of the following program segments:
i = 0
sum = 0
while i < 9:
if i % 4 == 0:
sum = sum + i
i = i + 2
print (sum)
a) Infinite Loop
b) 12
c) 14
d) 10
Answer : B
Question. Does Python support Exit – Controlled Loop?
a) Yes
b) No
Answer : B
Question. What will be the output of the given program segment?
for I in range(10, 1, 1):
print(I)
print(I)
a) 10
b) 9
c) Error
d) None of the above
Answer : B
Question. Which of the following is not a valid keyword of Python associated with loops?
a) continue
b) check
c) range
d) break
Answer : B
Question. When does the else statement written after loop executes?
a) When loop condition becomes false
b) When break statement is executed in the loop
c) else statement is always executed
d) None of the above
Answer : A
Question. Which term describes a loop that continues repeating without a terminating (ending) condition?
a) Infinite Loop
b) Conditional Loop
c) Unlimited Loop
d) Sequence Loop
Answer : A
Question. A count controlled loop will :
a) Repeat code until a condition is met
b) Repeat code a specific amount of times
c) Repeat code a random amount of times
d) None of the above
Answer : B
Question. Find the output of the following program segments:
a = 110
while a > 100:
print(a, end=’#’)
a –= 2
a) 110#108#106#104#102#100#
b) 110#108#106#104#102#
c) 110#108#106#104#102#
d) None of the above
Answer : B
Question. Which of the following is consider as an infinite loop?
a) while(infinte):
b) while(1):
c) while(not 1):
d) while(!1)
Answer : B
Question. Which of the following call to range() in Python will not yield anything?
a) range(-5, -1)
b) range(-1, -5, -1)
c) range(-5)
d) All of the above
Answer : C
Question. Which is not correct for the repetition constructs in Python?
a) For a for loop, an equivalent while loop can always be written.
b) For a while loop, an equivalent for loop can be written.
c) continue cannot be used with for loops.
d) else can be used with for and while both.
Answer : C
Question. Select which is true for, for loop
a) Python’s for loop used to iterates over the items of list, tuple, dictionary, set, or string
b) else clause of for loop is executed when the loop terminates naturally
c) else clause of for loop is executed when the loop terminates abruptly
d) We use for loop when we want to perform a task indefinitely until a particular condition is met
Answer : A
Question. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?
a) while Choice == Answer:
Choice = input()
b) while Choice != Answer:
Choice = input()
c) while Answer != Choice:
Choice = input()
d) while Answer =! Choice:
Choice = input()
Answer : B
Question. How would you create a loop to iterate over the contents of the list given as?
monthDays = [31,28,31,30,31,30,31,31,30,31,30,31]
and print out each element?
a) for days in range(monthDays):
print(days)
b) for days in monthDays:
print(days)
c) for days in range(len(monthDays)):
print(days)
d) for days in monthDays[0]:
print(days)
Answer : B
Question. How many times will this loop run?
while(1):
print(2)
a) 1 time
b) 2 times
c) 3 times
d) None of the above
Answer : D
Question. What will be the final value of I after execution of the loop:
for I in range(10):
print(I)
a) 10
b) 9
c) None
d) Error
Answer : B
Question. break in Python is used ______________
a) To restart a loop
b) Terminate a loop
c) To jump in between the loop
d) None of the above
Answer : B
Question. ________ in Python is a counter-controlled loop.
a) for
b) while
c) Both (a) and (b)
d) None of the above
Answer : A
Question. Code repeated / looped until a condition has been met or a set number of times.
a) Sequence
b) Iteration
c) Selection
d) Variable
Answer : B
Question. Find the output of the following program segments:
for i in range(20,30,2):
print(i)
a) 20 22 24 26 28
b) 20
22
24
26
28
c) 20 22 24 26 28 30
d) 20
22
24
26
28
30
Answer : B
Question. Iteration stands for ___________
a) The order in which instructions are carried out
b) A decision point in a program
c) The repetition of steps within a program
d) Testing a program to make sure it works
Answer : C
Question. How many times will this loop run?
while(1==2):
pass
a) 0
b) 1
c) 3
d) Infinite
Answer : D
Question. Which of the following is not a valid jump statement in Python?
a) break
b) goto
c) call
d) continue
Answer : C
CBSE Class 12 Computer Science Cascading Style Sheets and JavaScript MCQs |
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set A |
CBSE Class 12 Computer Science Classes and Objects In Java MCQs Set B |
CBSE Class 12 Computer Science Computer Hardware MCQs |
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set A |
CBSE Class 12 Computer Science Creating HTML Forms Using KompoZer MCQs Set B |
CBSE Class 12 Computer Science Data Structure MCQs |
CBSE Class 12 Computer Science Database Management System MCQs |
CBSE Class 12 Computer Science Designing Simple Website Using Kompozer MCQs |
CBSE Class 12 Computer Science Exception Handling In Java MCQs |
CBSE Class 12 Computer Science File Handling MCQs Set A |
CBSE Class 12 Computer Science File Handling MCQs Set B |
CBSE Class 12 Computer Science File System MCQs Set A |
CBSE Class 12 Computer Science File System MCQs Set B |
CBSE Class 12 Computer Science Flow of control conditional statements MCQs |
CBSE Class 12 Computer Science For Loop in Python MCQs |
CBSE Class 12 Computer Science Fundamentals of Computer MCQs |
CBSE Class 12 Computer Science Introduction To E Commerce MCQs |
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set A |
CBSE Class 12 Computer Science Introduction To M Commerce MCQs Set B |
CBSE Class 12 Computer Science Java Basics MCQs Set A |
CBSE Class 12 Computer Science Java Basics MCQs Set B |
CBSE Class 12 Computer Science Object Oriented Concepts MCQs |
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set A |
CBSE Class 12 Computer Science Publishing Documents Using Latex MCQs Set B |
CBSE Class 12 Computer Science Working with Function in Python MCQs |
MCQs for For Loop in Python Computer Science Class 12
Expert teachers of studiestoday have referred to NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 MCQs. If you download MCQs with answers for the above chapter you will get higher and better marks in Class 12 test and exams in the current year as you will be able to have stronger understanding of all concepts. Daily Multiple Choice Questions practice of Computer Science will help students to have stronger understanding of all concepts and also make them expert on all critical topics. After solving the questions given in the MCQs which have been developed as per latest books also refer to the NCERT solutions for Class 12 Computer Science. We have also provided lot of MCQ questions for Class 12 Computer Science so that you can solve questions relating to all topics given in each chapter. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter.
You can download the CBSE MCQs for Class 12 Computer Science For Loop in Python for latest session from StudiesToday.com
Yes, the MCQs issued by CBSE for Class 12 Computer Science For Loop in Python have been made available here for latest academic session
You can find CBSE Class 12 Computer Science For Loop in Python MCQs on educational websites like studiestoday.com, online tutoring platforms, and in sample question papers provided on this website.
To prepare for For Loop in Python MCQs, refer to the concepts links provided by our teachers and download sample papers for free.
Yes, there are many online resources that we have provided on studiestoday.com available such as practice worksheets, question papers, and online tests for learning MCQs for Class 12 Computer Science For Loop in Python