Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-5-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
6544dedc
authored
Oct 31, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
1fd967e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
bug.py
李嘉理代码.py
李嘉理讲解视频.mp4
bug.py
deleted
100644 → 0
View file @
1fd967e0
import
turtle
len
=
60
p
=
turtle
.
Pen
()
turtle
.
bgcolor
(
"pink"
)
s
=
turtle
.
Screen
()
len
=
int
(
s
.
textinput
(
"提示"
,
"东大12"
))
p
.
penup
()
p
.
goto
(
100
,
-
100
)
p
.
write
(
"
\n
hello
\n
"
,
font
=
(
"Times"
,
20
,
"normal"
))
p1
=
turtle
.
Pen
()
p1
.
fillcolor
(
"red"
)
p1
.
begin_fill
()
p1
.
left
(
45
)
p1
.
forward
(
len
*
2
)
p1
.
circle
(
len
,
180
)
p1
.
right
(
90
)
p1
.
circle
(
len
,
180
)
p1
.
forward
(
len
*
2
)
p1
.
end_fill
()
turtle
.
done
()
\ No newline at end of file
李嘉理代码.py
0 → 100644
View file @
6544dedc
import
turtle
as
tt
import
turtle
as
tt
from
random
import
randint
tt
.
TurtleScreen
.
_RUNNING
=
True
tt
.
speed
(
0
)
# 绘图速度为最快
tt
.
bgcolor
(
"black"
)
# 背景色为黑色
tt
.
setpos
(
-
25
,
25
)
# 改变初始位置,这可以让图案居中
tt
.
colormode
(
255
)
# 颜色模式为真彩色
cnt
=
0
while
cnt
<
500
:
r
=
randint
(
0
,
255
)
g
=
randint
(
0
,
255
)
b
=
randint
(
0
,
255
)
tt
.
pencolor
(
r
,
g
,
b
)
# 画笔颜色每次随机
tt
.
forward
(
50
+
cnt
)
tt
.
right
(
91
)
cnt
+=
1
tt
.
done
()
\ No newline at end of file
李嘉理讲解视频.mp4
0 → 100644
View file @
6544dedc
File added
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