CBSE Class 11 Computer Science Question 54 of 161

Flow of Control — Question 36

Back to all questions
36
Question

Question 36

Consider the following code segment :

for i in range(2, 4):
    print(i)

What values(s) are printed when it executes?

  1. 2
  2. 3
  3. 2 and 3 ✓
  4. 3 and 4
  5. 2, 3 and 4
Answer