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
c0561e6c
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c816b9b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
aixin.py
aixin.py
0 → 100644
View file @
c0561e6c
import
turtle
import
random
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
'pink'
)
#背景颜色
pen
=
turtle
.
Pen
()
# x = random.randint(50,200) #随机爱心大小
x
=
screen
.
textinput
(
'爱心大小'
,
'请输入:'
)
#弹窗
x
=
int
(
x
)
print
(
x
)
pen
.
color
(
'red'
)
pen
.
begin_fill
()
pen
.
left
(
45
)
pen
.
forward
(
x
)
pen
.
circle
(
x
/
2
,
180
)
pen
.
right
(
90
)
pen
.
circle
(
x
/
2
,
180
)
pen
.
forward
(
x
)
pen
.
end_fill
()
pen
.
up
()
pen
.
goto
(
100
,
-
100
)
pen
.
write
(
'我爱你!
\n
笨蛋
\n
哈哈'
,
font
=
(
'微软雅黑'
,
int
(
x
/
10
),
'normal'
))
pen
.
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