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
2eb225d7
authored
Jun 03, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
0d015f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
diy1.py
diy1.py
View file @
2eb225d7
# 利用write()帮助悟空给诺依回信吧~
# 利用write()帮助悟空给诺依回信吧~
c
发
if
holor
=
input
(
"画布颜色:"
)
name
=
input
(
"你的名字:"
)
lovecolor
=
input
(
"爱心颜色:"
)
lvcolor
=
input
(
"第二个爱心的颜色:"
)
lvsize
=
int
(
len2
)
import
turtle
import
turtle
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
color
)
len
=
screen
.
textinput
(
"提示"
,
"你想要多大的爱心"
)
len2
=
screen
.
texinput
(
"提示"
,
"第二个爱心的大小"
)
lovesize
=
int
(
len
)
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
pen
.
write
(
"你好
\n
"
+
name
,
font
=
(
"T
imes"
,
30
,
"normal"
))
pen
.
write
(
"你好
\n
nuoyi
\n
turtle真好用"
,
font
=
(
"t
imes"
,
30
,
"normal"
))
pen
.
hideturtle
()
pen
.
hideturtle
()
pen
.
penup
()
turtle
.
done
()
pen
.
goto
(
0
,
0
)
\ No newline at end of file
pen
.
pendown
()
pen
.
pensize
(
5
)
pen
.
pencolor
(
lovecolor
)
pen
.
left
(
45
)
pen
.
forward
(
2
*
lovesize
)
pen
.
circle
(
lovesize
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
lovesize
,
180
)
pen
.
forward
(
2
*
lovesize
)
pen
.
penup
()
pen
.
goto
(
100
,
100
)
pen
.
pendown
()
pen
.
pencolor
(
lvcolor
)
pen
.
forward
(
2
*
lvsize
)
pen
.
circle
(
lvsize
,
180
)
pen
.
right
(
90
)
vdcggfvyebduyxg
,
.
doh8wetgufo
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