forked from eskayML/turtle-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflag.py
46 lines (44 loc) · 749 Bytes
/
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
import turtle
def rectangle(color):
t.begin_fill()
t.fillcolor(color)
for i in range(2):
t.forward(400)
t.right(90)
t.forward(100)
t.right(90)
t.end_fill()
t=turtle.Turtle()
turtle.screensize(1100,1100)
turtle.title("National Flag Of India ")
t.up()
t.pensize(4)
t.goto(0,-300)
t.down()
t.goto(0,400)
rectangle("orange")
t.goto(0,300)
t.forward(200)
t.color("blue")
t.circle(-50)
t.setheading(270)
t.forward(50)
t.setheading(0)
for i in range(24):
t.forward(45)
t.bk(45)
t.left(15)
t.setheading(90)
t.forward(50)
t.setheading(0)
t.color("black")
t.forward(200)
t.right(90)
t.forward(100)
t.right(90)
t.forward(400)
t.right(90)
t.forward(100)
t.right(90)
t.goto(0,200)
rectangle("green")