-
Notifications
You must be signed in to change notification settings - Fork 2
/
batman.py
87 lines (67 loc) · 1.23 KB
/
batman.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
import turtle
#initialize method
bat = turtle.Turtle()
#size of pointer and pen
bat.turtlesize(1, 1, 1)
bat.pensize(3)
#screen info
wn = turtle.Screen()
wn.bgcolor("black")
wn.title("BATMAN")
#colour
bat.color("yellow", "black")
#begin filling color
bat.begin_fill()
#turn1
bat.left(90) # turn pointer direction to left of 90'
bat.circle(50, 85) #draw circle of radius = 50 and 85'
bat.circle(15, 110)
bat.right(180)
#turn 2
bat.circle(30, 150)
bat.right(5)
bat.forward(10) #draw forward line of 10 units
#turn 3
bat.right(90)
bat.circle(-70, 140)
bat.forward(40)
bat.right(110)
#turn 4
bat.circle(100, 30)
bat.circle(30, 100)
bat.left(50)
bat.forward(50)
bat.right(145)
#turn5
bat.forward(30)
bat.left(55)
bat.forward(10)
#reverse
#turn 5
bat.forward(10)
bat.left(55)
bat.forward(30)
#turn 4
bat.right(145)
bat.forward(50)
bat.left(50)
bat.circle(30, 100)
bat.circle(100, 30)
#turn 3
bat.right(90)
bat.right(20)
bat.forward(40)
bat.circle(-70, 140)
#turn 2
bat.right(90)
bat.forward(10)
bat.right(5)
bat.circle(30, 150)
#turn 1
bat.left(180)
bat.circle(15, 110)
bat.circle(50, 85)
#end color filling
bat.end_fill()
#end the turtle method
turtle.done()