0

Can anyone explain me in details how this code is works. Plz answer asap I have exam tomorrow.

https://code.sololearn.com/cC7TCFIvyly2/?ref=app

18th Oct 2020, 9:20 AM
zeeshan
zeeshan - avatar
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 ,
18th Oct 2020, 9:31 AM
Abhay
Abhay - avatar
0
Looks to me like it just inputs a limit and then counts up by 5s flipping the sign every iteration.
18th Oct 2020, 9:31 AM
Maxwell Anderson
Maxwell Anderson - avatar