-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment 4_3
More file actions
75 lines (75 loc) · 1.13 KB
/
Assignment 4_3
File metadata and controls
75 lines (75 loc) · 1.13 KB
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
'''
A program, which draws a human face with falling tear drops.
'''
import turtle
s=turtle.Screen()
#set screen size
s.setup(width=.75, height=0.5, startx=50, starty=50)
#define a turtle
t=turtle.Turtle()
#set the speed of drawing to the fastest mode
t.speed(0)
#set the pen size and color
t.pen(fillcolor="black", pencolor="red", pensize=10)
#draw face
t.penup()
t.sety(-180)
t.pendown()
t.circle(180)
#draw eyebrow
t.penup()
t.goto((-30,100))
t.pendown()
t.setheading(180)
t.circle(150,30,5)
t.penup()
t.goto((30,100))
t.pendown()
t.right(25)
t.circle(200,-25,5)
#draw eyes
t.penup()
t.goto((-40,80))
t.pendown()
t.circle(30)
t.penup()
t.goto((80,80))
t.pendown()
t.circle(30)
#draw nose
t.penup()
t.goto((0,-40))
t.pendown()
t.dot(20,"red")
#draw mouth
t.penup()
t.goto(-45,-120)
t.pendown()
t.seth(0)
t.forward(100)
#draw tear drops
t.penup()
t.goto(-50,-10)
t.pendown()
t.circle(10)
t.penup()
t.goto(70,-10)
t.pendown()
t.circle(10)
t.penup()
t.goto(-50,-50)
t.pendown()
t.circle(10)
t.penup()
t.goto(70,-50)
t.pendown()
t.circle(10)
t.penup()
t.goto(-50,-90)
t.pendown()
t.circle(10)
t.penup()
t.goto(70,-90)
t.pendown()
t.circle(10)
turtle.exitonclick()