-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDivergingTurtles.py
56 lines (48 loc) · 1.17 KB
/
DivergingTurtles.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import turtle
pen = turtle.Turtle()
turtle.penup()
turtle.setpos(-100,250)
turtle.pendown()
turtle.pencolor('olive')
turtle.write('Fifty Shades of Grey',font=("Arial", 18,"bold"))
turtle.penup()
turtle.speed(0)
turtle.setpos(0,0)
turtle.pendown()
turtle.color("black","white")
turtle.colormode(1.0)
SQUARES = 50
SIDE = 150
shade = 1.0
for count in range(SQUARES):
turtle.fillcolor(shade,shade,shade)
turtle.begin_fill()
turtle.left(360//SQUARES)
for side in range(4):
turtle.forward(SIDE)
turtle.left(90)
turtle.end_fill()
shade -= turtle.colormode()/float(SQUARES)
# turtle.penup()
# turtle.setpos(150,-270)
turtle.done()
turtle.mainloop()
# import turtle
# # import random
# # import time
# screen=turtle.Screen()
# trtl=turtle.Turtle()
# screen.setup(420,320)
# screen.bgcolor('lightblue')
# trtl.shape('turtle')
# trtl.color('darkgoldenrod','black')
# s=10
# trtl.penup()
# trtl.setpos(30,30)
# for i in range(50):
# s=s+2
# trtl.stamp()
# trtl.forward(s)
# trtl.right(25)
# # time.sleep(0.25) #activated with a break of a 1/4th of a second
# turtle.mainloop()