Skip to content

Commit 5a1ab05

Browse files
authored
Add files via upload
1 parent 1d703e1 commit 5a1ab05

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ex1.6AStarIsBorn.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Write a star function that will draw a five-pointed star. Next, write a function that will raw a spiral of stars.
2+
3+
from turtle import *
4+
shape('turtle')
5+
speed(0)
6+
7+
def createStar(sideLength=100):
8+
for i in range(5):
9+
fd(sideLength)
10+
rt(180-(180/5))
11+
12+
def starSpiral():
13+
for j in range(60):
14+
createStar(j*5)
15+
right(5)
16+
17+
starSpiral()

0 commit comments

Comments
 (0)