Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-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
54c8c1f6
authored
Jan 27, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a764eed2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
diy1.py
diy1.py
View file @
54c8c1f6
import
turtle
screen
=
turtle
.
Screen
()
pen
=
turtle
.
Pen
()
len
=
int
(
screen
.
textinput
(
'爱心的大小'
,
"请输入一个合适的数字"
))
pen
.
penup
()
pen
.
goto
(
100
,
100
)
pen
.
color
(
"red"
)
...
...
@@ -10,12 +12,11 @@ pen.pensize(10)
pen
.
fillcolor
(
'red'
)
pen
.
begin_fill
()
pen
.
left
(
45
)
pen
.
forward
(
100
)
pen
.
circle
(
50
,
180
)
pen
.
forward
(
len
*
2
)
pen
.
circle
(
len
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
50
,
180
)
pen
.
forward
(
100
)
pen
.
circle
(
len
,
180
)
pen
.
forward
(
len
*
2
)
pen
.
end_fill
()
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"pink"
)
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