-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
65 lines (57 loc) · 1.09 KB
/
main.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
import turtle
# Set up the turtle window
window = turtle.Screen()
window.bgcolor("white")
# Create the turtle for the dancer
dancer = turtle.Turtle()
dancer.shape("circle")
dancer.color("black", "pink")
dancer.penup()
# Draw the head
dancer.goto(0, 100)
dancer.pendown()
dancer.begin_fill()
dancer.circle(50)
dancer.end_fill()
# Draw the body
dancer.penup()
dancer.goto(0, 50)
dancer.pendown()
dancer.begin_fill()
dancer.circle(25)
dancer.end_fill()
# Draw the arms
dancer.penup()
dancer.goto(-30, 75)
dancer.pendown()
dancer.pensize(10)
dancer.right(45)
dancer.forward(50)
dancer.left(90)
dancer.forward(50)
dancer.penup()
dancer.goto(30, 75)
dancer.pendown()
dancer.right(90)
dancer.forward(50)
dancer.left(90)
dancer.forward(50)
# Draw the legs
dancer.penup()
dancer.goto(-20, 0)
dancer.pendown()
dancer.right(45)
dancer.forward(75)
dancer.left(45)
dancer.forward(50)
dancer.penup()
dancer.goto(20, 0)
dancer.pendown()
dancer.right(90)
dancer.forward(75)
dancer.left(90)
dancer.forward(50)
# Hide the turtle when finished
dancer.hideturtle()
# Keep the window open until closed by the user
turtle.done()