Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_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
d1b1e293
authored
Jun 01, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
fbf7a3d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
cao
diy1.py
ssb
cao
View file @
d1b1e293
wo cao
diy1.py
View file @
d1b1e293
import
turtle
import
turtle
pen
=
turtle
.
pen
()
pen
=
turtle
.
pen
()
screen
=
turtle
.
Screen
()
screen
=
turtle
.
Screen
()
colors
=
[
"white"
,
"red"
,
"pink"
,
"oange
'
]
colors
=
[
"white"
,
"red"
,
"pink"
,
"oange
"
]
distance
=
1
distance
=
1
pen
.
speed
(
1000
)
pen
.
speed
(
1000
)
for i in range(1
,3
00):
for
i
in
range
(
100
):
pen
.
pencolor
(
colors
[
i
%
4
])
pen
.
pencolor
(
colors
[
i
%
4
])
pen
.
forward
(
i
)
pen
.
forward
(
i
)
pen.right(91)
pen
.
right
(
45
)
distance
+=
1
pen
.
hideturtle
()
pen
.
hideturtle
()
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
ssb
View file @
d1b1e293
import turtle
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("light black")
colors=["white","red","violet","oange']
distance=1
pen.speed(1000)
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
pen.hideturtle()
turtle.done()
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