-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
91 lines (82 loc) · 1.69 KB
/
main.py
File metadata and controls
91 lines (82 loc) · 1.69 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import turtle as t
from turtle import Screen
import random
its = t.Turtle()
# its_turtle.shape("arrow")
# its_turtle.color("black")
# its_turtle.down()
# its_turtle.right(90)
# its_turtle.forward(100)
# its_turtle.right(90)
# its_turtle.forward(100)
# its_turtle.right(90)
# its_turtle.forward(100)
# its_turtle.right(90)
# its_turtle.forward
# for i in range(9):
# its.forward(5)
# its.penup()
# its.forward(8)
# # its.pendown()
# its.speed(300)
# for i in range(3):
# its.forward(100)
# its.right(120)
#
# for i in range(4):
# its.forward(100)
# its.right(90)
#
# for i in range(6):
# its.forward(100)
# its.right(60)
#
# for i in range(8):
# its.forward(100)
# its.right(45)
#
# for i in range(9):
# its.forward(100)
# its.right(40)
# its.color("violet")
# for i in range(10):
# its.forward(100)
# its.right(36)
# its.color("red")
# its.speed(3000)
# def shape(sides):
# angle = 360/sides
# for i in range(sides):
# its.forward(100)
# its.right(angle)
#
# for j in range(3,11):
# shape(j)
# colors = ["purple", "blue", "green", "black","yellow", "sunflower"]
#
# direction=[0,90,180,270]
#
# its.pensize(15)
#
# for i in range(30):
# its.color(random.choice(colors))
# its.forward(30)
# its.setheading(random.choice(direction))
t.colormode(255)
def colorm():
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
c = (r, g, b)
return c
colorm()
its.speed(500)
for i in range(40):
current = its.heading()
its.width(1)
its.color(colorm())
its.left(10)
its.circle(130)
its.setheading(current+10)
screen = Screen()
screen.exitonclick()