Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson15-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
f2b98f66
authored
Mar 11, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a8207343
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
my_tree.py
my_tree.py
View file @
f2b98f66
import
turtle
i
i
mport
random
pen
=
turtle
.
Turtle
()
pen
.
color
(
'sienna'
)
# 画布大小
w
=
turtle
.
Screen
()
w
.
bgcolor
(
'wheat'
)
# wheat小麦
def
a
(
n
):
if
n
>=
30
:
if
n
>=
0
:
b
=
random
.
random
()
c
=
1.5
*
b
turtle
.
forward
(
n
)
turtle
.
right
(
30
)
a
(
n
-
10
)
turtle
.
left
(
60
)
a
(
n
-
10
)
turtle
.
right
(
30
)
turtle
.
right
(
30
*
b
)
a
(
n
-
10
*
c
)
turtle
.
left
(
30
*
2
*
b
)
a
(
n
-
10
*
c
)
turtle
.
right
(
30
*
b
)
turtle
.
up
()
turtle
.
backward
(
n
)
turtle
.
down
()
...
...
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