Heeeelp! Why is my code for Python not working in Sololearn, but it works in different compiler on PC? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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