Confusion in looping | Sololearn: Learn to code for FREE!

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

2/17/2017 10:53:12 AM

Sk Maidur

7 Answers

New Answer

+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??