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
658b9914
authored
Sep 04, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
f6248ffe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
0 deletions
heka.py
one.py
heka.py
0 → 100644
View file @
658b9914
#导入模块
import
turtle
import
random
#创建画笔
p
=
turtle
.
Pen
()
s
=
turtle
.
Screen
()
s
.
bgcolor
(
"light blue"
)
p
.
penup
()
p
.
goto
(
100
,
-
150
)
#写祝福语
p
.
write
(
"你好,
\n
我是一大只"
,
font
=
(
"Times"
,
30
,
"normal"
))
p
.
hideturtle
()
l
=
int
(
s
.
textinput
(
"爱心大小"
,
"请输入"
))
# l = random.randint(50,100)
pp
=
turtle
.
Pen
()
pp
.
pencolor
(
"red"
)
pp
.
pensize
(
9
)
pp
.
left
(
45
)
pp
.
forward
(
l
)
pp
.
circle
(
l
/
2
,
180
)
pp
.
right
(
90
)
pp
.
circle
(
l
/
2
,
180
)
pp
.
forward
(
l
)
pp
.
hideturtle
()
turtle
.
done
()
one.py
0 → 100644
View file @
658b9914
import
turtle
import
random
import
time
p
=
turtle
.
Pen
()
s
=
turtle
.
Screen
()
f
=
int
(
s
.
textinput
(
"贺卡"
,
"请输入步长:"
))
colors
=
[
"red"
,
"green"
,
"pink"
,
"yellow"
,
"blue"
,
"indigo"
,
"violet"
]
s
.
bgcolor
(
random
.
choice
(
colors
))
p
.
color
(
random
.
choice
(
colors
))
p
.
fillcolor
(
random
.
choice
(
colors
))
p
.
begin_fill
()
p
.
pensize
(
10
)
# f = int(input("请输入步长:"))
p
.
left
(
45
)
p
.
forward
(
f
)
p
.
circle
(
f
/
2
,
180
)
p
.
right
(
90
)
p
.
circle
(
f
/
2
,
180
)
p
.
forward
(
f
)
p
.
penup
()
p
.
goto
(
50
,
-
100
)
p
.
write
(
"你好
\n
我是QUEEN"
,
font
=
(
"Times"
,
21
,
"normal"
))
p
.
end_fill
()
#多余的小心心
time
.
sleep
(
1
)
p
.
fillcolor
(
random
.
choice
(
colors
))
p
.
begin_fill
()
p
.
left
(
140
)
p
.
penup
()
p
.
goto
(
0
,
0
)
p
.
pendown
()
p
.
left
(
45
)
p
.
forward
(
f
)
p
.
circle
(
f
/
2
,
180
)
p
.
right
(
90
)
p
.
circle
(
f
/
2
,
180
)
p
.
forward
(
f
)
p
.
end_fill
()
time
.
sleep
(
2
)
p
.
fillcolor
(
random
.
choice
(
colors
))
p
.
begin_fill
()
p
.
left
(
130
)
p
.
penup
()
p
.
goto
(
0
,
0
)
p
.
pendown
()
p
.
left
(
45
)
p
.
forward
(
f
)
p
.
circle
(
f
/
2
,
180
)
p
.
right
(
90
)
p
.
circle
(
f
/
2
,
180
)
p
.
forward
(
f
)
p
.
end_fill
()
time
.
sleep
(
2
)
p
.
fillcolor
(
random
.
choice
(
colors
))
p
.
begin_fill
()
p
.
left
(
130
)
p
.
penup
()
p
.
goto
(
0
,
0
)
p
.
pendown
()
p
.
left
(
45
)
p
.
forward
(
f
)
p
.
circle
(
f
/
2
,
180
)
p
.
right
(
90
)
p
.
circle
(
f
/
2
,
180
)
p
.
forward
(
f
)
p
.
end_fill
()
p
.
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