- 1

Pyrhon

N=int (input ()) x=range (1,N+1) s=0 for i in range(x): s+=i print (s)

4th Feb 2021, 6:54 AM
Hanaly Hanalyyev
Hanaly Hanalyyev - avatar
2 Antworten
+ 2
Hanaly Hanalyyev In ur for loop put only x not the range function because u had already done it in 2nd line https://code.sololearn.com/c7jaFMyTUfPm/?ref=app
4th Feb 2021, 7:20 AM
Abhay
Abhay - avatar
- 1
Where is wrong
4th Feb 2021, 6:55 AM
Hanaly Hanalyyev
Hanaly Hanalyyev - avatar