Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-2_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
854013bc
authored
Nov 27, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
34ad88ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
diy1.py
diy1.py
0 → 100644
View file @
854013bc
import
turtle
t
=
turtle
.
Pen
()
s
=
turtle
.
Screen
()
len
=
s
.
textinput
(
"爱心大小:"
)
lovesize
=
int
(
len
)
def
a
():
t
.
pencolor
(
"yellow"
)
t
.
fillcolor
(
"yellow"
)
t
.
begin_fill
()
for
i
in
range
(
5
):
t
.
forward
(
15
)
t
.
left
(
144
)
t
.
end_fill
()
s
.
bgcolor
(
"light blue"
)
t
.
speed
(
50
)
t
.
shape
(
"turtle"
)
t
.
shapesize
(
2
)
t
.
pensize
(
5
)
t
.
goto
(
0
,
0
)
t
.
pencolor
(
"black"
)
t
.
fillcolor
(
"red"
)
t
.
begin_fill
()
t
.
left
(
45
)
t
.
forward
(
2
*
lovesize
)
t
.
circle
(
lovesize
,
180
)
t
.
right
(
90
)
t
.
circle
(
lovesize
,
180
)
t
.
forward
(
2
*
lovesize
)
t
.
end_fill
()
t
.
penup
()
t
.
setheading
(
0
)
t
.
right
(
90
)
t
.
forward
(
155
)
t
.
right
(
90
)
t
.
forward
(
300
)
t
.
pencolor
(
"purple"
)
t
.
pensize
(
3
)
t
.
write
(
"春江潮水连海平,海上明月共潮生。滟滟随波千万里,何处春江无月明!
\n
空里流霜不觉飞,汀上白沙看不见。江畔何人初见月?江月何年初照人?
\n
人生代代无穷已,江月年年望相似。不知江月待何人,但见长江送流水。
\n
白云一片去悠悠,青枫浦上不胜愁。谁家今夜扁舟子?何处相思明月楼?
\n
可怜楼上月裴回,应照离人妆镜台。此时相望不相闻,愿逐月华流照君。
\n
昨夜闲潭梦落花,可怜春半不还家。江水流春去欲尽,江潭落月复西斜。
\n
斜月沉沉藏海雾,碣石潇湘无限路。不知乘月几人归,落月摇情满江树"
,
font
=
(
"Times"
,
15
,
"normal"
))
t
.
pensize
(
1
)
t
.
penup
()
t
.
goto
(
0
,
0
)
t
.
setheading
(
90
)
t
.
forward
(
125
)
t
.
left
(
90
)
t
.
forward
(
50
)
t
.
pendown
()
t
.
pencolor
(
"yellow"
)
t
.
fillcolor
(
"yellow"
)
t
.
begin_fill
()
for
i
in
range
(
5
):
t
.
forward
(
27
)
t
.
left
(
144
)
t
.
end_fill
()
t
.
penup
()
t
.
goto
(
0
,
0
)
t
.
setheading
(
90
)
t
.
forward
(
145
)
t
.
left
(
90
)
t
.
forward
(
40
)
t
.
pendown
()
a
()
t
.
penup
()
t
.
goto
(
0
,
0
)
t
.
setheading
(
90
)
t
.
forward
(
130
)
t
.
left
(
90
)
t
.
forward
(
28
)
t
.
pendown
()
a
()
t
.
penup
()
t
.
goto
(
0
,
0
)
t
.
setheading
(
90
)
t
.
forward
(
110
)
t
.
left
(
90
)
t
.
forward
(
32
)
t
.
pendown
()
a
()
t
.
penup
()
t
.
goto
(
0
,
0
)
t
.
setheading
(
90
)
t
.
forward
(
98
)
t
.
left
(
90
)
t
.
forward
(
43
)
t
.
pendown
()
a
()
t
.
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