File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ import turtle
2
+ import math
3
+
4
+ t = turtle .Turtle ()
5
+
6
+ def ankur (x ,y ):
7
+ t .penup ()
8
+ t .goto (x ,y )
9
+ t .pencolor ()
10
+ t .setheading (0 )
11
+ t .pensize (2 )
12
+ t .speed (10 )
13
+
14
+ def golo (r ,color ):
15
+ x_point = 0
16
+ y_point = - r
17
+ ankur (x_point ,y_point )
18
+ t .pencolor (color )
19
+ t .fillcolor (color )
20
+ t .begin_fill ()
21
+ t .circle (r )
22
+ t .end_fill ()
23
+
24
+ def paanch (r , color ):
25
+ ankur (0 ,0 )
26
+ t .pencolor (color )
27
+ t .setheading (162 )
28
+ t .forward (r )
29
+ t .setheading (0 )
30
+ t .fillcolor (color )
31
+ t .begin_fill ()
32
+ for i in range (5 ):
33
+ t .forward (math .cos (math .radians (18 ))* 2 * r )
34
+ t .right (144 )
35
+ t .end_fill ()
36
+ t .hideturtle ()
37
+
38
+
39
+ if __name__ == '__main__' :
40
+ golo (288 ,'crimson' )
41
+ golo (234 ,'snow' )
42
+ golo (174 ,'crimson' )
43
+ golo (174 ,'blue' )
44
+ paanch (114 ,'snow' )
45
+ turtle .done ()
You can’t perform that action at this time.
0 commit comments