What does this code print? python print(range(1, 10, 2))

  1. 0 2 4 6 8
  2. 1 3 5 7 9
  3. 1 3 5 7 9 11
  4. 1 2 3 4 5
Answer

B) 1 3 5 7 9

range(1, 10, 2) starts at 1, steps by 2 and stops before 10. SLO CS-11-C-02

Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise