0
Confusion in looping
when i equate i=i-1 before print statement I get results from 3 to -1.....& when print statement is written before it ,I get results from 3 to 0
4 Réponses
+ 1
maybe posting your codes here can help me to figure out what's wrong
+ 1
OK I am sorry for that blunder...but can u answer my question??? @starlord
+ 1
thannk you @starlord
0
i=3
while i<=0:
i=i-1
print(i)
.
.
this give me 3,2,1,0,-1
but when the places of print statement & i=i-1 are interchanged ...I get 3,2,1,0...why so??