-
Notifications
You must be signed in to change notification settings - Fork 0
/
Art_Experiment2.py
68 lines (60 loc) · 1.67 KB
/
Art_Experiment2.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
#Create a house using starter code
#Import turtle
import turtle
#Set background to Navy Blue
turtle.bgcolor('navyblue')
shelly = turtle.Turtle()
#Start to create house
#Make first big yellow square for base structure of house
shelly.begin_fill() #Start the fill of color
shelly.color('yellow')
for i in range(4):
shelly.forward(100)
shelly.left(90)
shelly.end_fill() #End the fill of color
shelly.penup()
shelly.goto(-20,100) #Move the turtle to next area
shelly.pendown()
#Make a red triangle roof
shelly.begin_fill() #Start the fill of the roof
shelly.color('red')
shelly.left(60)
for i in range(2):
shelly.forward(140)
shelly.right(120)
shelly.forward(140)
shelly.end_fill() #End the fill of color for roof
#Create first window
shelly.penup()
shelly.goto(25,80) #Move to window position
shelly.pendown()
shelly.begin_fill() #Start filling window color
shelly.color('gray')
for i in range(4):
shelly.forward(20)
shelly.left(90)
shelly.end_fill() #End filling window color
#Create second window
shelly.penup()
shelly.goto(95,80) #Move to window position
shelly.pendown()
shelly.begin_fill() #Start filling window color
shelly.color('gray')
for i in range(4):
shelly.forward(20)
shelly.left(90)
shelly.end_fill() #End filling window color
#Create door under space between windows
shelly.penup()
shelly.goto(60,46)
shelly.pendown()
shelly.begin_fill() #Start filling door color
shelly.color('white')
for i in range(2):
shelly.forward(20)
shelly.left(90)
shelly.forward(45)
shelly.left(90)
shelly.end_fill() #End filling door color
#Hide the turtle when finished
shelly.hideturtle()