Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-4-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
de372845
authored
Oct 25, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
a50ceeec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
dasd.py
dasd.py
0 → 100644
View file @
de372845
import
turtle
screen
=
turtle
.
Screen
()
# 背景初始化
screen
.
bgcolor
(
"light blue"
)
# 背景颜色
pen
=
turtle
.
Pen
()
# 创建画笔1
pen
.
color
(
"red"
)
pen
.
pensize
(
5
)
# 画爱心
# 添加文本输入框
size
=
int
(
turtle
.
textinput
(
"提示2"
,
"你想画多大的爱心呢?"
))
pen
.
fillcolor
(
"red"
)
pen
.
begin_fill
()
pen
.
left
(
45
)
pen
.
forward
(
2
*
len
)
pen
.
circle
(
len
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
len
,
180
)
pen
.
forward
(
2
*
len
)
pen
.
end_fill
()
pen
.
hideturtle
()
# 写文字
pen1
=
turtle
.
Pen
()
pen1
.
pencolor
(
"purple"
)
pen1
.
penup
()
pen1
.
goto
(
-
100
,
-
100
)
text
=
turtle
.
textinput
(
"提示2"
,
"你想写点什么?"
)
pen1
.
write
(
text
,
font
=
(
"Times"
,
18
,
"normal"
))
pen1
.
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