Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-1-1_DIY1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1694dac2
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
638b27ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
384 additions
and
0 deletions
bingdundun.py
diy1.py
bingdundun.py
0 → 100644
View file @
1694dac2
import
turtle
pen
=
turtle
.
Pen
()
pen
.
speed
(
10
)
pen
.
shape
(
'turtle'
)
#自我介绍
pen
.
penup
()
pen
.
pencolor
(
"black"
)
pen
.
goto
(
200
,
-
200
)
pen
.
write
(
"大家好,
\n
我是你们的李老师,
\n
很高兴认识大家!"
,
font
=
(
'Times'
,
15
,
'normal'
))
pen
.
hideturtle
()
# 左手
pen
.
penup
()
pen
.
goto
(
177
,
112
)
pen
.
pencolor
(
"lightgray"
)
pen
.
pensize
(
3
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
80
)
pen
.
circle
(
-
45
,
200
)
pen
.
circle
(
-
300
,
23
)
pen
.
end_fill
()
# 左手内
pen
.
penup
()
pen
.
goto
(
182
,
95
)
pen
.
pencolor
(
"black"
)
pen
.
pensize
(
1
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
setheading
(
95
)
pen
.
pendown
()
pen
.
circle
(
-
37
,
160
)
pen
.
circle
(
-
20
,
50
)
pen
.
circle
(
-
200
,
30
)
pen
.
end_fill
()
# 轮廓
# 头顶
pen
.
penup
()
pen
.
goto
(
-
73
,
230
)
pen
.
pencolor
(
"lightgray"
)
pen
.
pensize
(
3
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
20
)
pen
.
circle
(
-
250
,
35
)
# 左耳
pen
.
setheading
(
50
)
pen
.
circle
(
-
42
,
180
)
# 左侧
pen
.
setheading
(
-
50
)
pen
.
circle
(
-
190
,
30
)
pen
.
circle
(
-
320
,
45
)
# 左腿
pen
.
circle
(
120
,
30
)
pen
.
circle
(
200
,
12
)
pen
.
circle
(
-
18
,
85
)
pen
.
circle
(
-
180
,
23
)
pen
.
circle
(
-
20
,
110
)
pen
.
circle
(
15
,
115
)
pen
.
circle
(
100
,
12
)
# 右腿
pen
.
circle
(
15
,
120
)
pen
.
circle
(
-
15
,
110
)
pen
.
circle
(
-
150
,
30
)
pen
.
circle
(
-
15
,
70
)
pen
.
circle
(
-
150
,
10
)
pen
.
circle
(
200
,
35
)
pen
.
circle
(
-
150
,
20
)
# 右手
pen
.
setheading
(
-
120
)
pen
.
circle
(
50
,
30
)
pen
.
circle
(
-
35
,
200
)
pen
.
circle
(
-
300
,
23
)
# 右侧
pen
.
setheading
(
86
)
pen
.
circle
(
-
300
,
26
)
# 右耳
pen
.
setheading
(
122
)
pen
.
circle
(
-
53
,
160
)
pen
.
end_fill
()
# 右耳内
pen
.
penup
()
pen
.
goto
(
-
130
,
180
)
pen
.
pencolor
(
"black"
)
pen
.
pensize
(
1
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
120
)
pen
.
circle
(
-
28
,
160
)
pen
.
setheading
(
210
)
pen
.
circle
(
150
,
20
)
pen
.
end_fill
()
# 左耳内
pen
.
penup
()
pen
.
goto
(
90
,
230
)
pen
.
setheading
(
40
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
circle
(
-
30
,
170
)
pen
.
setheading
(
125
)
pen
.
circle
(
150
,
23
)
pen
.
end_fill
()
# 右手内
pen
.
penup
()
pen
.
goto
(
-
180
,
-
55
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
setheading
(
-
120
)
pen
.
pendown
()
pen
.
circle
(
50
,
30
)
pen
.
circle
(
-
27
,
200
)
pen
.
circle
(
-
300
,
20
)
pen
.
setheading
(
-
90
)
pen
.
circle
(
300
,
14
)
pen
.
end_fill
()
# 左腿内
pen
.
penup
()
pen
.
goto
(
108
,
-
168
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
-
115
)
pen
.
circle
(
110
,
15
)
pen
.
circle
(
200
,
10
)
pen
.
circle
(
-
18
,
80
)
pen
.
circle
(
-
180
,
13
)
pen
.
circle
(
-
20
,
90
)
pen
.
circle
(
15
,
60
)
pen
.
setheading
(
42
)
pen
.
circle
(
-
200
,
29
)
pen
.
end_fill
()
# 右腿内
pen
.
penup
()
pen
.
goto
(
-
38
,
-
210
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
-
155
)
pen
.
circle
(
15
,
100
)
pen
.
circle
(
-
10
,
110
)
pen
.
circle
(
-
100
,
30
)
pen
.
circle
(
-
15
,
65
)
pen
.
circle
(
-
100
,
10
)
pen
.
circle
(
200
,
15
)
pen
.
setheading
(
-
14
)
pen
.
circle
(
-
200
,
27
)
pen
.
end_fill
()
# 右眼
# 眼圈
pen
.
penup
()
pen
.
goto
(
-
64
,
120
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
40
)
pen
.
circle
(
-
35
,
152
)
pen
.
circle
(
-
100
,
50
)
pen
.
circle
(
-
35
,
130
)
pen
.
circle
(
-
100
,
50
)
pen
.
end_fill
()
# 眼珠
pen
.
penup
()
pen
.
goto
(
-
47
,
55
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
25
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
-
45
,
62
)
pen
.
pencolor
(
"darkslategray"
)
pen
.
fillcolor
(
"darkslategray"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
19
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
-
45
,
68
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
10
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
-
47
,
86
)
pen
.
pencolor
(
"white"
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
5
,
360
)
pen
.
end_fill
()
# 左眼
# 眼圈
pen
.
penup
()
pen
.
goto
(
51
,
82
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
120
)
pen
.
circle
(
-
32
,
152
)
pen
.
circle
(
-
100
,
55
)
pen
.
circle
(
-
25
,
120
)
pen
.
circle
(
-
120
,
45
)
pen
.
end_fill
()
# 眼珠
pen
.
penup
()
pen
.
goto
(
79
,
60
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
24
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
79
,
64
)
pen
.
pencolor
(
"darkslategray"
)
pen
.
fillcolor
(
"darkslategray"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
19
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
79
,
70
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
10
,
360
)
pen
.
end_fill
()
pen
.
penup
()
pen
.
goto
(
79
,
88
)
pen
.
pencolor
(
"white"
)
pen
.
fillcolor
(
"white"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
0
)
pen
.
circle
(
5
,
360
)
pen
.
end_fill
()
# 鼻子
pen
.
penup
()
pen
.
goto
(
37
,
80
)
pen
.
fillcolor
(
"black"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
circle
(
-
8
,
130
)
pen
.
circle
(
-
22
,
100
)
pen
.
circle
(
-
8
,
130
)
pen
.
end_fill
()
# 嘴
pen
.
penup
()
pen
.
goto
(
-
15
,
48
)
pen
.
setheading
(
-
36
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
circle
(
60
,
70
)
pen
.
setheading
(
-
132
)
pen
.
circle
(
-
45
,
100
)
pen
.
end_fill
()
# 彩虹圈
pen
.
penup
()
pen
.
goto
(
-
135
,
120
)
pen
.
pensize
(
5
)
pen
.
pencolor
(
"cyan"
)
pen
.
pendown
()
pen
.
setheading
(
60
)
pen
.
circle
(
-
165
,
150
)
pen
.
circle
(
-
130
,
78
)
pen
.
circle
(
-
250
,
30
)
pen
.
circle
(
-
138
,
105
)
pen
.
penup
()
pen
.
goto
(
-
131
,
116
)
pen
.
pencolor
(
"slateblue"
)
pen
.
pendown
()
pen
.
setheading
(
60
)
pen
.
circle
(
-
160
,
144
)
pen
.
circle
(
-
120
,
78
)
pen
.
circle
(
-
242
,
30
)
pen
.
circle
(
-
135
,
105
)
pen
.
penup
()
pen
.
goto
(
-
127
,
112
)
pen
.
pencolor
(
"orangered"
)
pen
.
pendown
()
pen
.
setheading
(
60
)
pen
.
circle
(
-
155
,
136
)
pen
.
circle
(
-
116
,
86
)
pen
.
circle
(
-
220
,
30
)
pen
.
circle
(
-
134
,
103
)
pen
.
penup
()
pen
.
goto
(
-
123
,
108
)
pen
.
pencolor
(
"gold"
)
pen
.
pendown
()
pen
.
setheading
(
60
)
pen
.
circle
(
-
150
,
136
)
pen
.
circle
(
-
104
,
86
)
pen
.
circle
(
-
220
,
30
)
pen
.
circle
(
-
126
,
102
)
pen
.
penup
()
pen
.
goto
(
-
120
,
104
)
pen
.
pencolor
(
"greenyellow"
)
pen
.
pendown
()
pen
.
setheading
(
60
)
pen
.
circle
(
-
145
,
136
)
pen
.
circle
(
-
90
,
83
)
pen
.
circle
(
-
220
,
30
)
pen
.
circle
(
-
120
,
100
)
pen
.
penup
()
# 爱心
pen
.
penup
()
pen
.
goto
(
220
,
115
)
pen
.
pencolor
(
"brown"
)
pen
.
pensize
(
1
)
pen
.
fillcolor
(
"brown"
)
pen
.
begin_fill
()
pen
.
pendown
()
pen
.
setheading
(
36
)
pen
.
circle
(
-
8
,
180
)
pen
.
circle
(
-
60
,
24
)
pen
.
setheading
(
110
)
pen
.
circle
(
-
60
,
24
)
pen
.
circle
(
-
8
,
180
)
pen
.
end_fill
()
# 五环
pen
.
penup
()
pen
.
goto
(
-
5
,
-
170
)
pen
.
pendown
()
pen
.
pencolor
(
"blue"
)
pen
.
circle
(
6
)
pen
.
penup
()
pen
.
goto
(
10
,
-
170
)
pen
.
pendown
()
pen
.
pencolor
(
"black"
)
pen
.
circle
(
6
)
pen
.
penup
()
pen
.
goto
(
25
,
-
170
)
pen
.
pendown
()
pen
.
pencolor
(
"brown"
)
pen
.
circle
(
6
)
pen
.
penup
()
pen
.
goto
(
2
,
-
175
)
pen
.
pendown
()
pen
.
pencolor
(
"lightgoldenrod"
)
pen
.
circle
(
6
)
pen
.
penup
()
pen
.
goto
(
16
,
-
175
)
pen
.
pendown
()
pen
.
pencolor
(
"green"
)
pen
.
circle
(
6
)
pen
.
penup
()
pen
.
pencolor
(
"black"
)
pen
.
goto
(
-
56
,
-
160
)
pen
.
write
(
"酷睿特编程 BEIJING 2022"
,
font
=
(
'Arial'
,
10
,
'bold italic'
))
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
diy1.py
View file @
1694dac2
# 利用write()帮助悟空给诺依回信吧~
# 利用write()帮助悟空给诺依回信吧~
import
turtle
pen
=
turtle
.
Pen
()
pen
.
write
(
"你好呀!!
\n
小朋友们,我是你们的新老师,
\n
很高兴认识大家"
,
font
=
(
"Times"
,
20
,
"normal"
))
pen
.
hideturtle
()
pen1
=
turtle
.
Pen
()
pen1
.
circle
(
-
45
,
200
)
pen1
.
circle
(
-
300
,
23
)
# turtle.done()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment