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
fa574414
authored
Apr 04, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
d5ba7fed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
dy5.py
dy5.py
0 → 100644
View file @
fa574414
#导入
import
turtle
#创建画笔
pen
=
turtle
.
Pen
()
#创建屏幕
srceen
=
turtle
.
Screen
()
#改变背景颜色
srceen
.
bgcolor
(
"pink"
)
#写字
pen
.
write
(
"祝福语!
\n
,晴天柱"
,
font
=
(
"Times"
,
25
,
"normal"
))
pen
.
pencolor
(
"red"
)
pen
.
pensize
(
7
)
#转移阵地
pen
.
penup
()
pen
.
goto
(
-
100
,
50
)
pen
.
pendown
()
#注意数据类型转换
len
=
int
(
srceen
.
textinput
(
"提示"
,
"爱心大小"
))
#画爱心
pen
.
left
(
45
)
pen
.
forward
(
len
)
pen
.
circle
(
len
/
2
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
len
/
2
,
180
)
pen
.
forward
(
len
)
#隐藏画笔
pen
.
hideturtle
()
#保存画布
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