0
Can anyone explain me in details how this code is works. Plz answer asap I have exam tomorrow.
2 ответов
0
suppose input is 25, for i in range iterates over a created range of 5,10,15,20
For first number 5 ,term=5*-1=-5
sign=sign*-1=1
For second number 10,term=10*1=10
sign=sign*-1=-1
For third number 15,term=15*-1=-15
And so on ,
0
Looks to me like it just inputs a limit and then counts up by 5s flipping the sign every iteration.