Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_3
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
7a984dc3
authored
Jul 13, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
3c10bab6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
diy.py
diy.py
View file @
7a984dc3
import
turtle
turtle
.
speed
(
100
)
color
=
[
'red'
,
'blue'
,
'grey'
,
'green'
]
turtle
.
bgcolor
(
"black"
)
for
i
in
range
(
300
):
turtle
.
pencolor
(
color
[
i
%
4
])
turtle
.
forward
(
i
)
turtle
.
right
(
91
)
turtle
.
done
()
\ No newline at end of file
import
pygame
pygame
.
init
()
width
=
400
height
=
300
windowSize
=
[
width
,
height
]
screen
=
pygame
.
display
.
set_mode
(
windowSize
)
colour
=
pygame
.
color
.
Color
(
'#646400'
)
row
=
0
done
=
False
while
not
done
:
increment
=
255
/
100
while
row
<=
height
:
pygame
.
draw
.
rect
(
screen
,
colour
,(
0
,
row
,
width
,
row
+
increment
))
pygame
.
display
.
flip
()
if
colour
[
2
]
+
increment
<
255
:
colour
[
2
]
+=
increment
row
+=
increment
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
pygame
.
QUIT
:
done
=
True
pygame
.
quit
()
\ 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