+ 1
Need only last figure in output
N = int(input()) sum = 0 for N in range(0, N+1): sum += N print (sum)
5 Respuestas
+ 2
N = int(input())
sum = 0
for N in range(0, N+1):
sum += N # belong to loop.
print (sum) # this one is not belong to loop.
+ 1
Thank you!
+ 1
It's all about how identation works in python. So this may help you further.. Hope it helps.
https://code.sololearn.com/cT5BRIbkia21/?ref=app You're welcome..
0
Ident it out of loop. Currently it is inside loop.
0
I dont understand what must i do whith loop