25 Answers
+ 3
Basically, the loop construct looks like this
while <condition> :
# loop body
But I am sure this was covered in the lesson, so tell us what did you find to be unclear? must know this so discussion can become more effective.
+ 3
Yes Mr hakki .. But it can be possible that she is checking conditions ..
+ 1
Don't even bother to worry about streaks, I never count it. Besides what we learn is more precious than a statistical number.
+ 1
Ilya about your code, there is a much more efficient way to make an infinite loop. Instead of declaring a variable and using memory you can just say
while True:
print(sw)
True is a boolean value. In each iteration the condition will always be positive (True) and the action in each iteration will always be performed unless the condition is False or you break the loop with the Break statement.
+ 1
b = 0
While b < 4
Print (b)
B += 1
else:
Print ("loop is done")
0
Ok. Thank You!
0
No problem 👌
But if you still have uncertainty, just ask away.
0
Ok. In my project "Spam" I used this WHILE code
while (i==1):
print(sw)
https://code.sololearn.com/c8z0Xvm8jf7v/?ref=app
0
And your doubt is ...
0
Sorry, I cant understand You. What is DOUBT? (I am from Ukraine, and learning English)
0
Oh sorry, I mean, what is the problem that you mean to ask.
The code seems to be running with no problem, although it runs infinitely, so I'm not sure where the problem is ...
0
Oh. Ok. There no problem) cause thus code is called SPAM)))
0
You have 1627 days streak?
0
For me its IMPOSSIBLE)
0
While a=>b is wrong and you didn't assign value to b , while a>=b is correct
0
While repeat same element many times, try this:
i=0
while i < 10 :
print (i)
0
Bro the is you have to do like this :
Example:
B = 3
While b < a:
Print ('b')
B+=1
0
Than try with step = 1:
i=0
while i < 10:
print (i)
i = i+1
0
Okay this I nother method but it gave you the same output okay .
0
Gg