🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Loops: all 13 questions

Quiz: Python Loops · Question 2 of 13

How many times does the body run? for i in range(2, 20, 3):

How many times does the body run? for i in range(2, 20, 3):

  1. A.5
  2. B.6
  3. C.7
  4. D.18
Answer & explanation

Correct answer: 6

The values are 2, 5, 8, 11, 14, 17 — six values (20 is not reached).

Can you get the rest right without peeking?

Take the timed Quiz: Python Loops quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →