Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-2_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
062d9734
authored
Mar 14, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
1dd9b053
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
342 additions
and
2 deletions
Ameng.py
diy1.py
xiaolian.py
Ameng.py
0 → 100644
View file @
062d9734
# * -- utf-8 -- *
# Author: Tang
import
turtle
as
t
t
.
speed
(
10
)
t
.
pensize
(
8
)
t
.
hideturtle
()
t
.
screensize
(
500
,
500
,
bg
=
'white'
)
# 猫脸
t
.
fillcolor
(
'#00A1E8'
)
t
.
begin_fill
()
t
.
circle
(
120
)
t
.
end_fill
()
t
.
pensize
(
3
)
t
.
fillcolor
(
'white'
)
t
.
begin_fill
()
t
.
circle
(
100
)
t
.
end_fill
()
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
134
)
t
.
pd
()
t
.
pensize
(
4
)
t
.
fillcolor
(
"#EA0014"
)
t
.
begin_fill
()
t
.
circle
(
18
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
7
,
155
)
t
.
pensize
(
2
)
t
.
color
(
'white'
,
'white'
)
t
.
pd
()
t
.
begin_fill
()
t
.
circle
(
4
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
-
30
,
160
)
t
.
pensize
(
4
)
t
.
pd
()
t
.
color
(
'black'
,
'white'
)
t
.
begin_fill
()
a
=
0.4
for
i
in
range
(
120
):
if
0
<=
i
<
30
or
60
<=
i
<
90
:
a
=
a
+
0.08
t
.
lt
(
3
)
#向左转3度
t
.
fd
(
a
)
#向前走a的步长
else
:
a
=
a
-
0.08
t
.
lt
(
3
)
t
.
fd
(
a
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
30
,
160
)
t
.
pensize
(
4
)
t
.
pd
()
t
.
color
(
'black'
,
'white'
)
t
.
begin_fill
()
for
i
in
range
(
120
):
if
0
<=
i
<
30
or
60
<=
i
<
90
:
a
=
a
+
0.08
t
.
lt
(
3
)
# 向左转3度
t
.
fd
(
a
)
# 向前走a的步长
else
:
a
=
a
-
0.08
t
.
lt
(
3
)
t
.
fd
(
a
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
-
38
,
190
)
t
.
pensize
(
8
)
t
.
pd
()
t
.
right
(
-
30
)
t
.
forward
(
15
)
t
.
right
(
70
)
t
.
forward
(
15
)
t
.
pu
()
t
.
goto
(
15
,
185
)
t
.
pensize
(
4
)
t
.
pd
()
t
.
color
(
'black'
,
'black'
)
t
.
begin_fill
()
t
.
circle
(
13
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
13
,
190
)
t
.
pensize
(
2
)
t
.
pd
()
t
.
color
(
'white'
,
'white'
)
t
.
begin_fill
()
t
.
circle
(
5
)
t
.
end_fill
()
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
134
)
t
.
pensize
(
4
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
right
(
90
)
t
.
forward
(
40
)
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
124
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
10
)
t
.
forward
(
80
)
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
114
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
6
)
t
.
forward
(
80
)
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
104
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
0
)
t
.
forward
(
80
)
# 左边的胡子
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
124
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
170
)
t
.
forward
(
80
)
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
114
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
174
)
t
.
forward
(
80
)
t
.
pu
()
t
.
home
()
t
.
goto
(
0
,
104
)
t
.
pensize
(
3
)
t
.
pencolor
(
'black'
)
t
.
pd
()
t
.
left
(
180
)
t
.
forward
(
80
)
t
.
pu
()
t
.
goto
(
-
70
,
70
)
t
.
pd
()
t
.
color
(
'black'
,
'red'
)
t
.
pensize
(
6
)
t
.
seth
(
-
60
)
t
.
begin_fill
()
t
.
circle
(
80
,
40
)
t
.
circle
(
80
,
80
)
t
.
end_fill
()
t
.
pu
()
t
.
home
()
t
.
goto
(
-
80
,
70
)
t
.
pd
()
t
.
forward
(
160
)
t
.
pu
()
t
.
home
()
t
.
goto
(
-
50
,
50
)
t
.
pd
()
t
.
pensize
(
1
)
t
.
fillcolor
(
"#eb6e1a"
)
t
.
seth
(
40
)
t
.
begin_fill
()
t
.
circle
(
-
40
,
40
)
t
.
circle
(
-
40
,
40
)
t
.
seth
(
40
)
t
.
circle
(
-
40
,
40
)
t
.
circle
(
-
40
,
40
)
t
.
seth
(
220
)
t
.
circle
(
-
80
,
40
)
t
.
circle
(
-
80
,
40
)
t
.
end_fill
()
# 领带
t
.
pu
()
t
.
goto
(
-
70
,
12
)
t
.
pensize
(
14
)
t
.
pencolor
(
'red'
)
t
.
pd
()
t
.
seth
(
-
20
)
t
.
circle
(
200
,
30
)
t
.
circle
(
200
,
10
)
# 铃铛
t
.
pu
()
t
.
goto
(
0
,
-
46
)
t
.
pd
()
t
.
pensize
(
3
)
t
.
color
(
"black"
,
'#f8d102'
)
t
.
begin_fill
()
t
.
circle
(
25
)
t
.
end_fill
()
t
.
pu
()
t
.
goto
(
-
5
,
-
40
)
t
.
pd
()
t
.
pensize
(
2
)
t
.
color
(
"black"
,
'#79675d'
)
t
.
begin_fill
()
t
.
circle
(
5
)
t
.
end_fill
()
t
.
pensize
(
3
)
t
.
right
(
115
)
t
.
forward
(
7
)
t
.
mainloop
()
\ No newline at end of file
diy1.py
View file @
062d9734
# 玩家出拳
\ No newline at end of file
xiaolian.py
0 → 100644
View file @
062d9734
from
turtle
import
*
screensize
(
600
,
600
)
speed
(
10
)
def
Arc
(
initial_degree
,
step
,
rotate
,
rangeNum
):
seth
(
initial_degree
)
for
i
in
range
(
rangeNum
):
fd
(
step
)
lt
(
rotate
)
def
Line
(
x
,
y
,
delta_x
,
delta_y
):
pu
()
goto
(
x
,
y
)
pd
()
goto
(
x
+
delta_x
,
y
+
delta_y
)
#笑脸的小圆脸
pensize
(
15
)
color
(
'#DA993B'
,
'#FDE492'
)
pu
()
goto
(
0
,
-
200
)
pd
()
begin_fill
()
circle
(
200
,
366
)
end_fill
()
#腮红
#左侧
seth
(
90
)
color
(
'#FFE4E1'
)
pu
()
goto
(
-
90
,
-
15
)
pd
()
begin_fill
()
circle
(
42
)
end_fill
()
#左羞羞
color
(
'#FFB6C1'
)
Line
(
-
125
,
0
,
-
15
,
-
30
)
Line
(
-
150
,
0
,
-
15
,
-
30
)
#右侧
color
(
'#FFE4E1'
)
pu
()
goto
(
90
,
-
15
)
pd
()
begin_fill
()
circle
(
-
42
)
end_fill
()
#右羞羞
color
(
'#FFB6C1'
)
Line
(
140
,
0
,
-
15
,
-
30
)
Line
(
165
,
0
,
-
15
,
-
30
)
#笑脸的眼睛
pensize
(
15
)
#左眼
color
(
'#834F20'
)
pu
()
goto
(
-
48
,
50
)
pd
()
pensize
(
15
)
Arc
(
100
,
1
,
2
,
10
)
Arc
(
140
,
0.75
,
0.75
,
110
)
Arc
(
-
125
,
1
,
2
,
10
)
#右眼
pu
()
goto
(
48
,
50
)
pd
()
pensize
(
15
)
Arc
(
80
,
1
,
-
2
,
10
)
Arc
(
40
,
0.75
,
-
0.75
,
110
)
Arc
(
-
55
,
1
,
-
2
,
10
)
#笑脸的嘴巴
pensize
(
10
)
pu
()
#goto(-55,-80)
pd
()
color
(
'#B5501A'
)
#微笑弧
#Arc(-85,0.75,0.8,212)#Arc(-85,0.45,0.5,340)
#两瓣嘴
pu
()
goto
(
-
77
,
-
80
)
pd
()
Arc
(
-
85
,
0.6
,
1
,
170
)
Arc
(
-
85
,
0.6
,
1
,
180
)
hideturtle
()
done
()
\ No newline at end of file
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