-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPanda.py
75 lines (62 loc) · 1016 Bytes
/
Panda.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Import turtle package
import turtle
# Creating a turtle object(pen)
pen = turtle.Turtle()
# Defining method to draw a colored circle with a dynamic radius
def ring(col, rad):
pen.fillcolor(col)
pen.begin_fill()
pen.circle(rad)
pen.end_fill()
# Draw first ear
pen.up()
pen.setpos(-70, 140)
pen.down
ring('black', 30)
# Draw second ear
pen.up()
pen.setpos(70, 140)
pen.down()
ring('black', 30)
# Draw face
pen.up()
pen.setpos(0, 20)
pen.down()
ring('white', 80)
# Draw first eye
pen.up()
pen.setpos(-25, 95)
pen.down
ring('black', 16)
# Draw second eye
pen.up()
pen.setpos(25, 95)
pen.down()
ring('black', 16)
# Draw first eye
pen.up()
pen.setpos(-24, 97)
pen.down()
ring('white', 8)
# Draw second eye
pen.up()
pen.setpos(24, 97)
pen.down()
ring('white', 8)
# Draw nose
pen.up()
pen.setpos(0, 60)
pen.down
ring('black', 10)
# Draw mouth
pen.up()
pen.setpos(0, 60)
pen.down()
pen.right(90)
pen.circle(10, 180)
pen.up()
pen.setpos(0, 60)
pen.down()
pen.left(360)
pen.circle(10, -180)
pen.hideturtle()