- 2

can anyone explain this and give the answer please

a, sum = 1,0 while a<=5: a, sum = a+1, sum+a print ("the sum is ", sum)

28th Nov 2017, 5:25 AM
yash kuraichya
yash kuraichya - avatar
1 Answer
+ 1
prints the sum of integers 1 through 5, i.e, 15.
28th Nov 2017, 5:45 AM
Anil
Anil - avatar