Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson6-1
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
88de2bd4
authored
Mar 29, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
f7da7e50
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
39 deletions
FGJLDBUX.PY
diy.py
FGJLDBUX.PY
View file @
88de2bd4
import
turtle
import
random
def
tree
(
n
):
if
n
>=
50
:
pen
.
pensize
(
n
/
10
)
pen
.
forward
(
n
)
angle
=
random
.
randint
(
0
,
30
)
lenght
=
random
.
randint
(
1
,
15
)
pen
.
right
(
30
)
tree
(
n
-
lenght
)
pen
.
left
()
tree
(
n
-
lenght
)
pen
.
right
(
30
)
pen
.
up
()
pen
.
backward
(
n
)
pen
.
down
()
pen
=
turtle
.
Turtle
()
pen
.
color
(
'sienna'
)
pen
.
speed
(
0
)
w
=
turtle
.
Screen
()
w
.
bgcolor
(
"wheat"
)
pen
.
left
(
90
)
pen
.
up
()
pen
.
backward
(
150
)
pen
.
down
()
tree
(
60
)
turtle
.
done
\ No newline at end of file
diy.py
View file @
88de2bd4
list
=
(
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
)
list
.
remove
(
'1'
)
print
(
list
)
\ No newline at end of file
self
.
y
=
20
self
.
val
=
0
self
.
v
=
IntVar
()
for
info
in
alist
:
self
.
canvas
.
creat_text
(
40
,
self
.
y
,
text
=
info
,
font
=
(
"宋体"
,
11
),
anchor
=
w
,
fill
=
'#FF9900'
)
self
.
y
+=
30
def
get_info
(
self
):
info
=
self
.
ent
.
ent
.
get
()
self
.
ent
.
delete
(
"0"
,
END
)
if
info
!=
""
:
alist
.
append
(
info
)
self
.
canvas
.
creat_text
(
40
,
self
.
f
,
text
=
info
,
font
=
(
"宋体"
,
11
),
anchor
=
W
,
fill
=
'#FF9900'
)
self
.
y
+=
30
\ 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