forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2fc6fe
commit eaba6ea
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# import turtle | ||
|
||
import turtle | ||
|
||
# defining colors | ||
|
||
colors = ['red', 'yellow', 'green', 'purple', 'blue', 'orange'] | ||
|
||
# setup turtle pen | ||
|
||
t= turtle.Pen() | ||
|
||
# changes the speed of the turtle | ||
|
||
t.speed(10) | ||
|
||
# changes the background color | ||
|
||
turtle.bgcolor("black") | ||
|
||
# make spiral_web | ||
|
||
for x in range(200): | ||
|
||
t.pencolor(colors[x%6]) # setting color | ||
|
||
t.width(x/100 + 1) # setting width | ||
|
||
t.forward(x) # moving forward | ||
|
||
t.left(59) # moving left | ||
|
||
turtle.done() | ||
|
||
t.speed(10) | ||
|
||
|
||
turtle.bgcolor("black") # changes the background color | ||
|
||
# make spiral_web | ||
|
||
for x in range(200): | ||
|
||
t.pencolor(colors[x%6]) # setting color | ||
|
||
t.width(x/100 + 1) # setting width | ||
|
||
t.forward(x) # moving forward | ||
|
||
t.left(59) # moving left | ||
|
||
turtle.done() |