- 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)
1 Answer
+ 1
prints the sum of integers 1 through 5, i.e, 15.
a, sum = 1,0 while a<=5: a, sum = a+1, sum+a print ("the sum is ", sum)