-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStar.py
55 lines (55 loc) · 974 Bytes
/
Star.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import turtle as t
def halftriangestar(fillcolor,pencolor,pensize):
t.fillcolor(fillcolor)
t.pencolor(pencolor)
t.pensize(pensize)
t.begin_fill()
t.lt(45)
t.fd(40)
t.lt(70)
t.fd(60)
t.lt(155)
t.fd(85)
t.end_fill()
t.fillcolor(fillcolor)
t.pencolor(pencolor)
t.pensize(pensize)
t.begin_fill()
t.lt(90)
t.fd(70)
t.rt(150)
t.fd(45)
t.rt(60)
t.fd(40)
t.end_fill()
def reversehalftriangestar(fillcolor,pencolor,pensize):
t.fillcolor(fillcolor)
t.pencolor(pencolor)
t.pensize(pensize)
t.begin_fill()
t.rt(45)
t.fd(40)
t.rt(70)
t.fd(60)
t.rt(155)
t.fd(85)
t.end_fill()
t.fillcolor(fillcolor)
t.pencolor(pencolor)
t.pensize(pensize)
t.begin_fill()
t.lt(100)
t.fd(70)
t.lt(150)
t.fd(45)
t.lt(60)
t.fd(40)
t.end_fill()
for i in range(2):
halftriangestar("yellow", "yellow", "12")
t.lt(35)
t.goto(-3,0)
t.rt(5)
for i in range(2):
reversehalftriangestar("orange", "orange", "10")
t.lt(135)