-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPanda.py
More file actions
94 lines (76 loc) · 1.48 KB
/
Copy pathPanda.py
File metadata and controls
94 lines (76 loc) · 1.48 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Wolverine
#
# Created: 28-07-2022
# Copyright: (c) Wolverine 2022
# Licence: <your licence>
#-------------------------------------------------------------------------------
import turtle
t = turtle.Turtle()
turtle.Screen().bgcolor("yellow")
def circles(color, radius):
# Set the fill
t.fillcolor(color)
# Start filling the color
t.begin_fill()
# Draw a circle
t.circle(radius)
# Ending the filling of the color
t.end_fill()
# Draw first ear
t.up()
t.setpos(-35, 95)
t.down
circles('black', 15)
# Draw second ear
t.up()
t.setpos(35, 95)
t.down()
circles('black', 15)
#....... Draw face ......#
t.up()
t.setpos(0, 35)
t.down()
circles('white', 40)
#....... Draw eyes black .....#
# Draw first eye
t.up()
t.setpos(-18, 75)
t.down
circles('black', 8)
# Draw second eye
t.up()
t.setpos(18, 75)
t.down()
circles('black', 8)
#........ Draw eyes white ......#
# Draw first eye
t.up()
t.setpos(-18, 77)
t.down()
circles('white', 4)
# Draw second eye
t.up()
t.setpos(18, 77)
t.down()
circles('white', 4)
#......... Draw nose......#
t.up()
t.setpos(0, 55)
t.down
circles('black', 5)
#...... Draw mouth ....#
t.up()
t.setpos(0, 55)
t.down()
t.right(90)
t.circle(5, 180)
t.up()
t.setpos(0, 55)
t.down()
t.left(360)
t.circle(5, -180)
t.hideturtle()