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
d15a2e1f
authored
Nov 25, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c2f1308f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
dai.py
dai.py
0 → 100644
View file @
d15a2e1f
#导入
import
turtle
#创建画笔
pen
=
turtle
.
Pen
()
#背景颜色
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
#写字
pen
.
write
(
"Ihewrfbjsk
\n
ldnvsprihjbik
\n
ncvl kbnsdgjnfsklb"
,
font
=
(
"Times"
,
30
,
"normal"
))
#转移阵地
pen
.
penup
()
pen
.
goto
(
-
100
,
100
)
pen
.
pendown
()
#画爱心
#半径
#弹窗:数据类型转换
r
=
int
(
screen
.
textinput
(
"提示"
,
"爱心尺寸"
))
pen
.
pensize
(
5
)
pen
.
pencolor
(
"red"
)
pen
.
left
(
45
)
pen
.
forward
(
2
*
r
)
pen
.
circle
(
r
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
r
,
180
)
pen
.
forward
(
2
*
r
)
#隐藏画笔
pen
.
hideturtle
()
#保存画布
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