Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson3_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
b1f02efc
authored
3 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
e9d90fee
c176066l1354p256a13982/wx124428
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
158 additions
and
0 deletions
kyu,ki.py
不给好处工程名称美国.py
kyu,ki.py
0 → 100644
View file @
b1f02efc
from
turtle
import
*
from
time
import
sleep
def
go_to
(
x
,
y
):
up
()
goto
(
x
,
y
)
down
()
def
big_Circle
(
size
):
speed
(
10
)
for
i
in
range
(
150
):
forward
(
size
)
right
(
0.3
)
def
small_Circle
(
size
):
speed
(
10
)
for
i
in
range
(
210
):
forward
(
size
)
right
(
0.786
)
def
line
(
size
):
speed
(
10
)
forward
(
51
*
size
)
def
heart
(
x
,
y
,
size
):
go_to
(
x
,
y
)
left
(
150
)
begin_fill
()
line
(
size
)
big_Circle
(
size
)
small_Circle
(
size
)
left
(
120
)
small_Circle
(
size
)
big_Circle
(
size
)
line
(
size
)
end_fill
()
def
arrow
():
pensize
(
10
)
setheading
(
0
)
go_to
(
-
400
,
0
)
left
(
15
)
forward
(
150
)
go_to
(
339
,
178
)
forward
(
150
)
def
arrowHead
():
pensize
(
1
)
speed
(
10
)
color
(
'red'
,
'red'
)
begin_fill
()
left
(
120
)
forward
(
20
)
right
(
150
)
forward
(
35
)
right
(
120
)
forward
(
35
)
right
(
150
)
forward
(
20
)
end_fill
()
def
main
():
pensize
(
2
)
color
(
'red'
,
'pink'
)
getscreen
()
.
tracer
(
30
,
0
)
heart
(
200
,
0
,
1
)
setheading
(
0
)
heart
(
-
80
,
-
100
,
1.5
)
arrow
()
arrowHead
()
go_to
(
400
,
-
300
)
#write("author:520Python", move=True, align="left", font=("宋体", 30, "normal"))
done
()
main
()
This diff is collapsed.
Click to expand it.
不给好处工程名称美国.py
0 → 100644
View file @
b1f02efc
import
turtle
as
T
import
turtle
as
T
import
random
import
time
# 画樱花的躯干(60,t)
def
Tree
(
branch
,
t
):
time
.
sleep
(
0.0005
)
if
branch
>
3
:
if
8
<=
branch
<=
12
:
if
random
.
randint
(
0
,
2
)
==
0
:
t
.
color
(
'snow'
)
# 白
else
:
t
.
color
(
'lightcoral'
)
# 淡珊瑚色
t
.
pensize
(
branch
/
3
)
elif
branch
<
8
:
if
random
.
randint
(
0
,
1
)
==
0
:
t
.
color
(
'snow'
)
else
:
t
.
color
(
'lightcoral'
)
# 淡珊瑚色
t
.
pensize
(
branch
/
2
)
else
:
t
.
color
(
'sienna'
)
# 赭(zhě)色
t
.
pensize
(
branch
/
10
)
# 6
t
.
forward
(
branch
)
a
=
1.5
*
random
.
randint
(
10
,
100
)
t
.
right
(
20
*
a
)
b
=
1.5
*
random
.
randint
(
1
,
9
)
Tree
(
branch
-
10
*
b
,
t
)
t
.
left
(
40
*
a
)
Tree
(
branch
-
10
*
b
,
t
)
t
.
right
(
20
*
a
)
t
.
up
()
t
.
backward
(
branch
)
t
.
down
()
# 掉落的花瓣
def
Petal
(
m
,
t
):
for
i
in
range
(
m
):
a
=
200
-
400
*
random
.
random
()
b
=
10
-
20
*
random
.
random
()
t
.
up
()
t
.
forward
(
b
)
t
.
left
(
90
)
t
.
forward
(
a
)
t
.
down
()
t
.
color
(
'lightcoral'
)
# 淡珊瑚色
t
.
circle
(
1
)
t
.
up
()
t
.
backward
(
a
)
t
.
right
(
90
)
t
.
backward
(
b
)
# 绘图区域
t
=
T
.
Turtle
()
# 画布大小
w
=
T
.
Screen
()
w
.
t
.
hideturtle
()
# 隐藏画笔
t
.
getscreen
()
.
tracer
(
5
,
0
)
w
.
screensize
(
canvheight
=
768
,
canvwidth
=
1024
,
bg
=
'wheat'
)
# wheat小麦
w
.
title
(
'**************樱花**************'
)
t
.
left
(
90
)
t
.
up
()
t
.
backward
(
150
)
t
.
down
()
t
.
color
(
'sienna'
)
# 画樱花的躯干
Tree
(
400
,
t
)
# 掉落的花瓣
Petal
(
400
,
t
)
w
.
exitonclick
()
\ 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