forked from parshant-balwaria/Python_hacktoberfest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain3.py
More file actions
37 lines (34 loc) · 827 Bytes
/
main3.py
File metadata and controls
37 lines (34 loc) · 827 Bytes
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
import turtle
t = turtle.Turtle()
screen = turtle.Screen()
screen.screensize(600,500)
screen.bgcolor('black')
turtle.colormode(255)
t.ht()
t.speed(50)
x = 0
r = 254
g = 0
b = 0
for angle in range(0, 360, 2):
tup = (r, g, b)
t.pencolor(tup)
for i in range(1, 5):
if r == 254 and g < 254 and b == 0:
g += 2
elif r > 0 and g == 254 and b == 0:
r -= 2
elif r == 0 and g == 254 and b < 254:
b += 2
elif r == 0 and g > 0 and b == 254:
g -= 2
elif r < 254 and g == 0 and b == 254:
r += 2
elif r == 254 and g == 0 and b > 0:
b -= 2
for i in range(2):
# two arcs
t.circle(100, 90)
t.circle(100 // 3, 90)
t.seth(angle)
turtle.done()