Computer Science, asked by nandinijain9, 1 year ago

x=0
y=5
for i in range(x-y*2):
print("%",i)
why there is no output....?????

Answers

Answered by AmartyaChowdhury
1

because

in your for loop, range is

x-y*2 = 0-5*2 = -10,

So your loop's range is negative, i.e. -10, so it is not running at all, because it can never start because range should have a positive value...

I think that this might be the answer, try correcting this mistake and run the program again, I think it should work...

HOPE THIS ANSWER HELPS....

Answered by YadhuKrishnan7050
0

Bcoz value of range is negative thus results in no output...

Similar questions