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
d5c230f5
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
5b15971a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
3 deletions
dai.py
dai.py
View file @
d5c230f5
a
=
input
(
"输入:"
)
print
(
type
(
a
))
\ No newline at end of file
#导入
import
turtle
#创建画笔
p
=
turtle
.
Pen
()
#创建一个屏幕
s
=
turtle
.
Screen
()
#改变屏幕颜色
s
.
bgcolor
(
"pink"
)
#改变画笔粗细和颜色
p
.
pencolor
(
"red"
)
p
.
pensize
(
7
)
#设置变量
len
=
int
(
s
.
textinput
(
"提示"
,
"lovesize"
))
#画爱心
p
.
left
(
45
)
p
.
forward
(
len
)
p
.
circle
(
len
/
2
,
180
)
p
.
right
(
90
)
p
.
circle
(
len
/
2
,
180
)
p
.
forward
(
len
)
#抬笔
p
.
penup
()
#转移阵地
p
.
goto
(
100
,
-
100
)
#写字
p
.
write
(
"你好呀
\n
ioaehts veau6489
\n
wytgioshfvbasd
\n
vkjad"
,
font
=
(
"Times"
,
30
,
"normal"
))
#隐藏画笔
p
.
hideturtle
()
#保存画布
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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