- 1

How does it works?

no=int(input()) Sum=0 for n in range(no+1): Sum+=n print(Sum)

29th Mar 2022, 3:53 PM
Байгелди Мусаев
Байгелди Мусаев - avatar
1 Answer
+ 2
What exactly do you mean? Which part is unclear to you? The loop sums up all numbers from 0 to no and prints the result.
29th Mar 2022, 4:17 PM
Lisa
Lisa - avatar