Podsumowanie:
zrobilismy program zigzag z 3 chapteru, podrzucam kod:
from time import sleep
indent = " "
max_spaces = 5
go_to_right = True
while True:
print(f"{indent}********")
if len(indent) < max_spaces and go_to_right is True:
indent = indent + ' '
if len(indent) == max_spaces:
go_to_right = False
if len(indent) == 0:
go_to_right = True
if go_to_right is False:
indent = indent[:-1] # pomniejszamy wciecie o 1
sleep(0.5)
Reactions: pink_heart 脳2 (DoomHammer, Asia_Lena) 路
脳1 (deleted_user_83454f0c50aa)