-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindian_flag.py
92 lines (76 loc) · 1.1 KB
/
indian_flag.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
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
92
# Pyhton code for indian flag
import turtle
from turtle import *
screen = turtle.Screen()
t = turtle.Turtle()
t.speed(1)
t.penup()
t.goto(-200,125)
t.pendown()
t.color("orange")
t.begin_fill()
t.forward(400)
t.right(90)
t.forward(84)
t.right(90)
t.forward(400)
t.end_fill()
t.left(90)
t.forward(84)
t.color("green")
t.begin_fill()
t.forward(84)
t.left(90)
t.forward(400)
t.left(90)
t.forward(84)
t.end_fill()
t.penup()
t.goto(35,0)
t.pendown()
t.color("navy")
t.begin_fill()
t.circle(35)
t.end_fill()
t.penup()
t.goto(30,0)
t.pendown()
t.color("white")
t.begin_fill()
t.circle(30)
t.end_fill()
t.penup()
t.goto(-27,-4)
t.pendown()
t.color("navy")
for i in range(24):
t.begin_fill()
t.circle(2)
t.end_fill()
t.penup()
t.forward(7)
t.right(15)
t.pendown()
t.color("navy")
t.penup()
t.goto(10,0)
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
t.goto(0,0)
t.pendown()
t.pensize(1)
for i in range(24):
t.forward(30)
t.backward(30)
t.left(15)
t.color("brown")
t.pensize(10)
t.penup()
t.goto(-200,125)
t.right(180)
t.pendown()
t.forward(800)
turtle.done()