“В то время как петля Python” Ответ

Python делает пока

# Python does not have a do-while loop. You can however simulate
# it by using a while loop over True and breaking when a certain
# condition is met.
# Example:
i = 1
while True:
    print(i)
    i = i + 1
    if(i > 3):
        break
SkelliBoi

Как написать заявление о том, как в Python

myvariable = 10
while myvariable > 0:
  print(myvariable)
  myvariable -= 1
Thoughtful Trout

Делаться в Python

There is no direct do while loop in python.
Lala Talishinskaya

В то время как петля Python

# While loop counting to 10 in 2's

i = 2

while i <= 10:  # While i is less than or equal 10, it will add 2
  print(i)
  i = i + 2
Helpless Hamster

В то время как петля Python

i = 1
while i<10:
 print("hello world")
 i+=1
#note the i++ syntax is not valid in python
Javasper

В то время как петля Python

print 0,4
Encouraging Eagle

Ответы похожие на “В то время как петля Python”

Вопросы похожие на “В то время как петля Python”

Больше похожих ответов на “В то время как петля Python” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования