Skip to content

Commit 13ece47

Browse files
authored
Add files via upload
1 parent 2d631b1 commit 13ece47

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ex1.4PolygonFunction.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Write a function that takes an integer as an arguement and makes the turtle draw a polygon with that integer's umber of sides.
2+
3+
from turtle import *
4+
shape('turtle')
5+
6+
def createPolygon(sideLength=5):
7+
for i in range(sideLength):
8+
fd(50)
9+
rt(360/sideLength)
10+
11+
createPolygon(10)

0 commit comments

Comments
 (0)