0
what mean «while» in python
2 odpowiedzi
+ 4
While loop is a type of loop in python. It does something until when the condition specified is true.
while (True):
print (1)
# It will print 1 forever as the condition specified is always true.
0
forget the code for a moment think of the logic in two states to begin with.
while the sun is out
its daylight
until the sun goes down
then its night two conditions one or the other.
three states
when the grand old duke was up, he was up
when he was down, he was down
when only halfway up neither up or down.
thats three states up down the grey area null is neither