Computer Science, asked by palakrajput2409, 6 months ago

find the output of : range (1,5,2)​

Answers

Answered by shivakumarjagadish12
1

Answer:

1 3

Explanation:

this only works if you do it like this;

for i in range(1,5,2):

     print(i)

then the output is

1

3

hope it helped you

Answered by anindyaadhikari13
1

Answer:-

Given code,

for i in range(1,5,2):

print(i)

At first, i=1

Output:- 1

Now,

i=3

Output:- 3

Now,

i=5 and i>4

So, loop terminates here.

Output:-

1

3

Similar questions