0

Heeeelp! Why is my code for Python not working in Sololearn, but it works in different compiler on PC?

N = int(input()) x = list(range(1,N+1) y = 0 for i in x[0:100:1]: y = i + y if i == 100: break print(y) >>Invalid syntax line 3

20th Feb 2022, 4:57 PM
Alexandr Grebyonkin
Alexandr Grebyonkin - avatar
2 Answers
+ 4
Add closing bracket after range(1, N+ 1)
20th Feb 2022, 4:59 PM
Мартин 😑🎵
Мартин 😑🎵 - avatar
+ 2
Thank you 🙃
20th Feb 2022, 5:05 PM
Alexandr Grebyonkin
Alexandr Grebyonkin - avatar