+ 4

What's the error in this code ?[Solved]

https://code.sololearn.com/cGruGeT8KNaL/?ref=app I wanna append all the prime numbers from 1 to 100 but the code is only appending only 1 number!Why?

17th Apr 2021, 4:48 AM
マッドキング♣️✨♣️ [MadKing]
マッドキング♣️✨♣️ [MadKing] - avatar
4 Respuestas
+ 7
Unpuzzling Because you are not reinitialising count with 0 after first loop https://code.sololearn.com/cV6PcXPYQ6Gw/?ref=app
17th Apr 2021, 5:04 AM
A͢J
A͢J - avatar
+ 9
https://code.sololearn.com/cHZ7LRSea61u/?ref=app Read it carefully hope it will help you ☺️
17th Apr 2021, 5:05 AM
Akshay Panwar
Akshay Panwar - avatar
+ 1
Plz can someone help me out in this x=0 for i in range(30): x+=1 print x
18th Apr 2021, 8:45 PM
Teyei Anna
Teyei Anna - avatar
+ 1
Teyei Anna You must give a space before (x+=1) for the syntax.And you also forgot to give the parenthesis to the print statement! The actual code would be like :- x=0 for i in range(30): x+=1 print(x)
19th Apr 2021, 2:13 AM
マッドキング♣️✨♣️ [MadKing]
マッドキング♣️✨♣️ [MadKing] - avatar