Как мне сделать цикл шаблона Letter Star, пока я не наберу «стоп» - я не могу заставить код работать правильно [дубликат ⇐ Python
Как мне сделать цикл шаблона Letter Star, пока я не наберу «стоп» - я не могу заставить код работать правильно [дубликат
I seem to be having trouble getting programs to continue until I input a 'stop' command. I have this new code below that prints letters as a star pattern as I want them to but I need it to continue until I type 'stop'.
def pattern(): for i in range(len(name)): if name =="B": print_B = [[" " for i in range (5)] for j in range (5)] for row in range(5): for col in range(5): if (col==0) or (col==4 and (row!=0 and row!=2 and row!=4)) or ((row==0 or row==2 or row==4) and (col>0 and col
Источник: https://stackoverflow.com/questions/780 ... t-make-the
I seem to be having trouble getting programs to continue until I input a 'stop' command. I have this new code below that prints letters as a star pattern as I want them to but I need it to continue until I type 'stop'.
def pattern(): for i in range(len(name)): if name =="B": print_B = [[" " for i in range (5)] for j in range (5)] for row in range(5): for col in range(5): if (col==0) or (col==4 and (row!=0 and row!=2 and row!=4)) or ((row==0 or row==2 or row==4) and (col>0 and col
Источник: https://stackoverflow.com/questions/780 ... t-make-the
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение