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
169bf176
authored
Jul 11, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3991e105
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
diy1.py
diy1.py
View file @
169bf176
...
@@ -3,10 +3,13 @@ import turtle
...
@@ -3,10 +3,13 @@ import turtle
#创建画笔
#创建画笔
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
#写字
#写字
# pen.write(' 《红豆》\n红豆生南国,\n春来发几枝。\n愿君多采撷,\n此物最相思。',font=('黑体',30,'normal'))
pen
.
write
(
' 《红豆》
\n
红豆生南国,
\n
春来发几枝。
\n
愿君多采撷,
\n
此物最相思。'
,
font
=
(
'黑体'
,
30
,
'normal'
))
pen
.
penup
()
pen
.
color
(
"dark blue"
)
pen
.
goto
(
-
100
,
0
)
pen
.
fillcolor
(
"gold"
)
pen
.
pendown
()
pen
.
color
(
"gold"
)
pen
.
pensize
(
3
)
pen
.
fillcolor
(
"red"
)
pen
.
begin_fill
()
pen
.
begin_fill
()
pen
.
lt
(
45
)
pen
.
lt
(
45
)
pen
.
fd
(
100
)
pen
.
fd
(
100
)
...
@@ -15,6 +18,7 @@ pen.right(90)
...
@@ -15,6 +18,7 @@ pen.right(90)
pen
.
circle
(
50
,
180
)
pen
.
circle
(
50
,
180
)
pen
.
fd
(
100
)
pen
.
fd
(
100
)
pen
.
end_fill
()
pen
.
end_fill
()
pen
.
hideturtle
()
#保存画布
#保存画布
turtle
.
done
()
turtle
.
done
()
...
...
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