-
Notifications
You must be signed in to change notification settings - Fork 0
/
turtle1.py
99 lines (80 loc) · 1.34 KB
/
turtle1.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
93
94
95
96
97
98
99
import turtle
# t=turtle.Turtle()
# t.forward(100)
# t.left(90)
# t.forward(50)
# t.left(90)
# t.forward(100)
# t.left(90)
# t.forward(50)
# turtle.done()
#to draw rectangle using loop
# t = turtle.Turtle()
# t.pencolor('red')
# for i in range(4):
# t.forward(100)
# t.left(90)
# t.left(45)
# t.forward(140)
#
# turtle.done()
# to make rectangle
t = turtle.Turtle()
# t.pencolor('red')
# for i in range(2):
# t.forward(100)
# t.left(90)
# t.forward(50)
# t.left(90)
# # t.stamp()
#
# # to make circle
# t.begin_fill()
# t.shape('arrow')
# t.circle(10)
# t.forward(100)
# t.fillcolor('yellow')
# t.circle(10)
# t.stamp()
# to make small rectangle
t.end_fill()
t.penup()
t.goto(50,30)
t.pendown()
for i in range(4):
t.forward(10)
t.left(90)
# to make circle
# t.penup()
# t.goto(0,150)
# t.pendown()
# t.begin_fill()
# t.fillcolor('grey')
# t.circle(50)
# t.end_fill()
# to fill circle
# t.penup()
# t.goto(-200,0)
# t.pendown()
# for i in range(10):
# t.circle(10*i)
# t.up()
# t.sety((10*i)*(-1))
# t.down()
# t.goto(-200,100)
# to make hexagon
# t.pencolor('red')
# t.penup()
# t.goto(-500,-150)
# t.pendown()
# for i in range(12):
# t.forward(50)
# t.left(30)
# to make star
t.pencolor('red')
t.penup()
t.goto(-500,-150)
t.pendown()
for i in range(100):
t.circle(10*i)
turtle.done()