-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAss4_3.py
88 lines (86 loc) · 1.18 KB
/
Ass4_3.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
import turtle
import time
screen = turtle.Screen()
s=turtle.Screen()
t=turtle.Turtle()
t.hideturtle()
t.penup()
t.setx(-20)
t.sety(-120)
t.pendown()
t.pensize(3)
t.circle(100)
t.penup()
t.setx(0)
t.sety(0)
t.setx(-50)
t.setheading(150)
t.pendown()
t.circle(50, 60)
t.penup()
#Here we set coordinates for left eye
t.setx(-75)
t.sety(-10)
t.penup()
#Here we draw left eye
t.dot(15)
t.penup()
#here we draw the left eye tear
t.penup()
t.setx(-75)
t.sety(-30)
t.penup()
t.dot(5)
t.penup()
t.setx(-75)
t.sety(-50)
t.dot(5)
t.penup()
t.setx(-75)
t.sety(-70)
t.dot(5)
#Here we draw the right eyebrow
t.setx(50)
t.sety(0)
t.setheading(150)
t.pendown()
t.circle(50, 60)
#Here we draw the right eye
t.penup()
t.setx(25)
t.sety(-10)
t.penup()
t.dot(15)
#here we draw the right eye tear
t.penup()
t.setx(25)
t.sety(-30)
t.penup()
t.dot(5)
t.penup()
t.setx(25)
t.sety(-50)
t.dot(5)
t.penup()
t.setx(25)
t.sety(-70)
t.dot(5)
#Here we draw the nose
t.penup()
t.setx(-20)
t.sety(-20)
t.pendown()
t.pensize(5)
t.goto(-20,-50)
#Here we draw the mouth
t.penup()
t.setx(-27)
t.sety(-80)
t.setheading(0)
t.pendown()
t.circle(90, 10)
#Animation control
for i in range(1000):
turtle.stamp()
turtle.update()
time.sleep(3)