Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-3_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
71301819
authored
Mar 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
98ebd2b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
10 deletions
diy1.py
diy1.py
View file @
71301819
#利用write()帮助悟空给诺依回信吧
#导入 画图 模
# import turtle
# pen=turtle.Pen()
# pen.write("嘻嘻嘻嘻嘻嘻嘻",font=('宋体',32,'normal'))
# turtle.done()
# import turtle
# pen1=turtle.Pen()
# pen1.crcle(-50)
# turtle.done()
import
turtle
pen
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
lovesize
=
int
(
screen
.
textinput
(
"标题"
,
"请输入爱心的半径"
))
pen
.
penup
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
"诺依,你好"
,
font
=
(
"楷体"
,
20
,
"normal"
))
pen1
=
turtle
.
Pen
()
pen1
.
pensize
(
5
)
pen1
.
pencolor
(
"red"
)
pen1
.
left
(
45
)
pen1
.
forward
(
lovesize
*
2
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
lovesize
,
180
)
pen1
.
forward
(
lovesize
*
2
)
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