Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

multiple choice you used range in definite loops earlier in the course.…

Question

multiple choice
you used range in definite loops earlier in the course. the output of the range function is a sequence, which is a list of integers.
range(3) creates which sequence of numbers?
1, 2, 3, 4
0, 1, 2, 3
0, 1, 2
1, 2, 3

Explanation:

Brief Explanations

In Python, the range(n) function generates a sequence of integers starting from 0 and going up to but not including n. So for range(3), it starts at 0 and goes up to 2.

Answer:

[0, 1, 2]