Empowering Students with AI-Powered Assessments & Intelligent Learning
Chapter Exam

Chapter-4 Iterative Statements in Python — Online MCQ Test

INFORMATION TECHNOLOGY · Grade 8 · CBSE(NCERT)

Practice Chapter-4 Iterative Statements in Python with a free chapter-wise online MCQ test for CBSE(NCERT) Grade 8 INFORMATION TECHNOLOGY. This chapter covers: control flow - iteration - for loop - while loop - infinite loop - loop variable - range function - membership operators. AI-generated questions from basic to board-exam level, with instant results and explanations.

10
Questions
20m
Time Limit
3
Attempts Left
  • 10 random questions from this chapter (mixed difficulty)
  • Questions you've seen before won't repeat until the pool resets
  • You have 20 minutes — exam auto-submits when time is up
  • Maximum 3 attempts per chapter
  • Results and explanations shown immediately after submission
Login to Start This Exam →

New here? Register free — includes 3 free chapter exams.

Chapter-4 Iterative Statements in Python — Important Questions & Answers (FAQ)

Frequently asked questions from CBSE(NCERT) Grade 8 INFORMATION TECHNOLOGY — Chapter-4 Iterative Statements in Python, with answers and explanations. These are sample questions; the exam has its own separate question set.

Which keyword is used to create a loop in Python that repeats a block of code?
  • A. repeat
  • B. loop
  • C. for ✓
  • D. iterate
Answer: C. for
The 'for' keyword is used to create a for loop in Python, which is one of the primary iterative statements.
What is the purpose of the range() function in Python?
  • A. To find the maximum value in a list
  • B. To generate a sequence of numbers ✓
  • C. To check if a value exists in a list
  • D. To convert a string to a number
Answer: B. To generate a sequence of numbers
The range() function generates a sequence of numbers, commonly used with for loops to repeat code a specific number of times.
Which of the following is a membership operator in Python?
  • A. ==
  • B. in ✓
  • C. and
  • D. not
Answer: B. in
The 'in' operator is a membership operator used to check if a value exists in a sequence like lists, strings, or tuples.
What will be the output of this code? for i in range(3): print(i)
  • A. 1 2 3
  • B. 0 1 2 ✓
  • C. 0 1 2 3
  • D. 1 2
Answer: B. 0 1 2
The loop prints values from range(3), which generates 0, 1, and 2. Each value is printed on a new line.
What will be the output? for i in range(1, 4): for j in range(1, 3): print(i, j)
  • A. 1 1, 1 2, 2 1, 2 2, 3 1, 3 2 ✓
  • B. 1 1, 2 1, 3 1
  • C. 1 2, 2 2, 3 2
  • D. 1 1, 1 2, 1 3
Answer: A. 1 1, 1 2, 2 1, 2 2, 3 1, 3 2
This is a nested loop. The outer loop runs for i = 1, 2, 3, and for each, the inner loop runs for j = 1, 2, producing all combinations.

Choose Your Plan & Start Practising

All plans cover every subject and chapter of your registered grade.

Free
₹0
3 exams · 1 year
Start Free →
Active
₹350
12 exams · 1 year
Get Active →
Pro
₹899
Unlimited exams · 1 year
Get Pro →

Compare all plans in detail →