+ 1

Hi guys, can you tell me what is wrong in my code? It's telling me that there's no output.

x = 0 while x<=10: if(x%2==0): print(x) x=+1

3rd Apr 2022, 9:24 AM
Liwaa Bou Hamdan
Liwaa Bou Hamdan - avatar
1 Resposta
+ 4
the problem is that you have written x=+1 which is wrong the correct one should be - x+=1 and the second problem is the wrong indentation it should be like this - x = 0 while x<=10: if(x%2==0): print(x) x+=1
3rd Apr 2022, 9:37 AM
Shaurya Kushwaha