for i in range (-5,0,1) चलेगा
for i in range (-5,0,1) will run
A
4 times
B
5 times
C
6 times
D
3 time
Explanation
Let's analyze the code:
for i in range(-5, 0, 1):
- The
range()function takes three arguments:start,stop, andstep.start = -5stop = 0(but 0 is not included in the range)step = 1
This means the loop will iterate over the values: -5, -4, -3, -2, -1.
So, the loop runs 5 times.
The correct answer is:
(B) 5 times.
Correct Answer: B) 5 times