-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboat_design.py
More file actions
116 lines (107 loc) · 1.66 KB
/
boat_design.py
File metadata and controls
116 lines (107 loc) · 1.66 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#import Turtle
import turtle
t=turtle.Turtle()
scr=turtle.Screen()
scr.bgcolor("SkyBlue1")#Background Color
time.sleep(2)
#Draw the deck of the boat
t.color("black","orange")
t.penup()
time.sleep(2)
t.goto(-100,-150)
t.begin_fill()
t.pendown()
t.forward(200)
t.left(60)
t.forward(80)
t.setheading(180)
t.forward(280)
t.left(120)
t.forward(80)
t.end_fill()
t.backward(80)
t.setheading(0)
t.forward(140)
t.left(90)
#Draw the stick of the boat
t.pensize(8)
t.forward(125)
t.backward(5)
t.penup()
#draw the white left wings of the boat
t.pensize(2)
t.pendown()
t.left(130)
t.forward(4)
t.color("white")
t.begin_fill()
t.forward(165)
t.setheading(0)
t.forward(125)
t.end_fill()
t.penup()
t.left(90)
t.forward(108)
t.right(90)
t.forward(7)
#draw the right white wing of the boat
t.pensize(2)
t.pendown()
t.right(40)
t.color("white")
t.begin_fill()
t.forward(168)
t.setheading(180)
t.forward(125)
t.end_fill()
t.penup()
#Draw the three small circles of the boat
t.color("black","white")
t.goto(-70,-100)
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
t.goto(-0,-100)
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
t.goto(70,-100)
t.pendown()
t.begin_fill()
t.circle(10)
t.end_fill()
t.penup()
#draw the circle of the sun
t.color("yellow","yellow")
t.goto(-200,200)
t.pendown()
t.begin_fill()
t.circle(30)
t.end_fill()
t.penup()
#sunrays
t.pensize(5)
t.goto(-200,170)
for i in range(12):
t.pendown()
t.backward(80)
t.forward(80)
t.left(30)
t.penup()
#Draw the water
t.goto(-800,-150)
t.setheading(0)
t.color("Blue","Blue")
t.pendown()
t.begin_fill()
t.forward(1500)
t.right(90)
t.forward(180)
t.right(90)
t.forward(1500)
t.end_fill()
turtle.done()