-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArt.py
More file actions
34 lines (27 loc) · 691 Bytes
/
Copy pathArt.py
File metadata and controls
34 lines (27 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import turtle
import random
window = turtle.Screen()
arthur = turtle.Turtle()
window.colormode(255)
arthur.speed(0)
arthur.width(2)
window.bgcolor(50, 0, 70)
arthur.pencolor(255,255,0)
def shape(angle, side, limit:
reverseDirection = 200
arthur.forward(side)
if side % (reverDirection*2) == 0:
angle = angle + 2
print side
elif side % reverseDirection ==0:
angle = angle - 2
print side
arthur.right(angle)
side = side + 2
if side < limit:
shape(angle,side,limit)
angle = 118
side = 0
limit = 600
shape(angle, side, limit)
turtle.done()