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
414c4f67
authored
Apr 03, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ef9525fa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
diy1.py
diy1.py
View file @
414c4f67
...
...
@@ -6,15 +6,14 @@ screen.bgcolor("pink")
lovesize
=
int
(
screen
.
textinput
(
"标题"
,
"请输入爱心的半径"
))
pen
.
penup
()
#把笔抬起来
pen
.
goto
(
100
,
-
100
)
#把笔移到到指定的位置
pen
.
write
(
"春晓
\n
春眠不觉晓
\n
处处蚊子咬
\n
夜来巴掌声
\n
蚊子死多少"
,
font
=
(
"楷体"
,
20
,
"normal"
))
#用笔写字
pen
.
write
(
"诺依,你好"
,
font
=
(
"楷体"
,
20
,
"normal"
))
#用笔写字
pen1
=
turtle
.
Pen
()
#又拿一支笔出来
pen1
.
pensize
(
5
)
#设置笔的大小
pen1
.
pencolor
(
"red"
)
#设置笔的颜色
pen1
.
left
(
45
)
#把笔左转
pen1
.
forward
(
100
)
#让笔移到
pen1
.
circle
(
50
,
180
)
#让笔画圆,第一个是半径,第二个是角度
pen1
.
forward
(
lovesize
*
2
)
#让笔移到
pen1
.
circle
(
lovesize
,
180
)
#让笔画圆,第一个是半径,第二个是角度
pen1
.
right
(
90
)
#让笔右转
pen1
.
circle
(
50
,
180
)
#让笔画圆,第一个是半径,第二个是角度
pen1
.
forward
(
100
)
#让笔移到
pen1
.
circle
(
lovesize
,
180
)
#让笔画圆,第一个是半径,第二个是角度
pen1
.
forward
(
lovesize
*
2
)
#让笔移到
turtle
.
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