-
Notifications
You must be signed in to change notification settings - Fork 0
/
chrome_logo.py
65 lines (59 loc) · 997 Bytes
/
chrome_logo.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
57
58
59
60
61
62
63
64
65
import turtle
# Initializing the module
t = turtle.Turtle()
t.speed(8)
turtle.bgcolor('white')
t.color('white')
turtle.title("Chrome logo")
t.up()
t.goto(0, 240)
t.color("#df382c")
t.fillcolor("#df382c")
t.begin_fill()
t.down()
t.circle(-240, 60)
(x, y) = t.pos()
t.goto(0, 120)
t.setheading(180)
t.circle(120, 120)
(xi, yi) = t.pos()
t.goto(x-2*x, y)
t.left(120)
t.circle(-240, 60)
t.end_fill()
t.up()
t.goto(x, y)
t.color("#fbc118")
t.fillcolor("#fbc118")
t.begin_fill()
t.down()
t.right(60)
t.circle(-240, 120)
(x, y) = t.pos()
t.goto(xi-2*xi, yi)
t.setheading(t.towards(x, y)+180)
t.circle(120, 120)
t.end_fill()
t.up()
t.goto(x, y)
t.color("#299947")
t.fillcolor("#299947")
t.begin_fill()
t.down()
t.circle(-240, 120)
(x, y) = t.pos()
t.goto(xi, yi)
t.setheading(t.towards(x, y)+180)
t.circle(120, 120)
t.end_fill()
t.up()
t.color("#1a73e9")
t.fillcolor("#1a73e9")
t.goto(0, 95)
t.setheading(0)
t.down()
t.begin_fill()
t.circle(-95, 360)
t.end_fill()
t.hideturtle()
turtle.exitonclick()