Skip to content

Commit ed28739

Browse files
committed
Update Turtle-Star.py
1 parent 61df436 commit ed28739

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

Turtle-Star.py

+14-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22

33
title('Turtle Star')
44
bgcolor('black')
5-
color('red','red')
65

7-
while True:
8-
forward(200)
9-
left(170)
10-
if abs(pos()) < 1:
11-
break
6+
f='r'
127

13-
hideturtle()
8+
while True:
9+
if f=='r':
10+
color('red')
11+
forward(200)
12+
left(170)
13+
if abs(pos()) < 1:
14+
f='w'
15+
if f=='w':
16+
color('white')
17+
forward(200)
18+
left(170)
19+
if abs(pos()) < 1:
20+
f='r'
1421

1522
mainloop()

0 commit comments

Comments
 (0)