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
4c65583d
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
7f29246c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
diy1.py
diy1.py
View file @
4c65583d
# 利用write()帮助悟空给诺依回信吧~
# 利用write()帮助悟空给诺依回信吧~
import
turtle
import
turtle
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"light green"
)
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
pen
.
write
(
" 春晓
\n
春明不觉晓
\n
处处闻啼鸟
\n
夜来风雨声
\n
花落知多少"
,
font
=
(
"Times"
,
40
,
"normal"
))
pen
.
penup
()
pen
.
goto
(
-
100
,
-
300
)
pen
.
write
(
" 春晓
\n
春明不觉晓
\n
处处闻啼鸟
\n
夜来风雨声
\n
花落知多少"
,
font
=
(
"Times"
,
20
,
"normal"
))
pen
.
hideturtle
()
pen
.
hideturtle
()
turtle
.
done
()
p
=
turtle
.
Pen
()
\ No newline at end of file
len
=
screen
.
textinput
(
"提示"
,
"请输入爱心的大小"
)
l
=
int
(
len
)
len
=
20
p
.
pensize
(
5
)
p
.
pencolor
(
"blue"
)
p
.
fillcolor
(
"red"
)
p
.
begin_fill
()
p
.
left
(
45
)
p
.
forward
(
2
*
l
)
p
.
circle
(
l
,
180
)
p
.
right
(
90
)
p
.
circle
(
l
,
180
)
p
.
forward
(
2
*
l
)
p
.
end_fill
()
p
.
hideturtle
()
turtle
.
done
()
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