0
can anyone help me
x = 0 while x >= 10 : print(x) if x == 2 : print("Skipping 2") break x = x + 1 how to fix this it says No Output.
3 Respuestas
+ 3
Because your condition never gonna true set the value of x more than 10
see here
while(x>=10) 0>=10 // false
That's why while loop body statement won't execute
+ 3
As ASR said you need to change your while statement to:
while x <= 10: (while x is less than or equal to 10)
+ 1
x = 0
while x >= 10 :
print(x)
if x == 2 :
print("Skipping 2")
break;
x = x + 1
I think this is the right code I am a beginner I show you what I could 😉
how to fix this it says No Output.