-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBoat.py
81 lines (72 loc) · 908 Bytes
/
Boat.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
from turtle import *
setup(800, 500)
speed(0)
# Sky
bgcolor("lightskyblue")
# Water
penup()
goto(-400, -150)
pendown()
color("mediumblue")
begin_fill()
for i in range(2):
forward(800)
right(90)
forward(100)
right(90)
end_fill()
# Boat
penup()
goto(-200, -80)
pendown()
color("saddlebrown")
begin_fill()
right(45)
forward(100)
left(45)
forward(250)
left(45)
forward(100)
end_fill()
# Mast
penup()
goto(0, -80)
pendown()
color("black")
begin_fill()
left(45)
for i in range(2):
forward(200)
left(90)
forward(10)
left(90)
end_fill()
# Right Sail
penup()
goto(0, 120)
pendown()
color("white")
begin_fill()
right(130)
forward(250)
right(140)
forward(190)
end_fill()
# Left Sail
penup()
forward(14)
pendown()
begin_fill()
forward(180)
right(139)
forward(240)
end_fill()
# Sun
penup()
goto(-300, 150)
pendown()
color("yellow")
begin_fill()
circle(40)
end_fill()
hideturtle()