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

17th Feb 2017, 10:53 AM
Sk Maidur
Sk Maidur - avatar
4 Réponses
+ 1
maybe posting your codes here can help me to figure out what's wrong
17th Feb 2017, 11:25 AM
AlexAnder
+ 1
OK I am sorry for that blunder...but can u answer my question??? @starlord
17th Feb 2017, 4:07 PM
Sk Maidur
Sk Maidur - avatar
+ 1
thannk you @starlord
17th Feb 2017, 4:16 PM
Sk Maidur
Sk Maidur - avatar
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??
17th Feb 2017, 11:31 AM
Sk Maidur
Sk Maidur - avatar