Code Sketch
House using def
Category: Art
clear()
showAxes()
setSpeed(superFast)
setPenColor(black)
def house=Picture.rectangle(400,400)
house.thatsFilledWith(Color(204, 51, 0)).thatsStrokeColored(black).thatsTranslated(-200,-250).draw()
def square=Picture.rect(90,100)
def door=Picture.rect(200,100)
def wintop=Picture.rect(50,200)
def triangle = Picture
{
setPenColor(black)
right(90)
forward(100)
left(120)
forward(100)
left(120)
forward(100)
}
square.thatsFilledWith(brown).thatsStrokeColored(black).thatsTranslated(-150,0).draw()
square.thatsFilledWith(brown).thatsStrokeColored(black).thatsTranslated(50,0).draw()
triangle.thatsFilledWith(brown).thatsTranslated(-150, 0).draw()
triangle.thatsFilledWith(brown).thatsTranslated(50, 0).draw()
door.thatsFilledWith(brown).thatsStrokeColored(black).thatsTranslated(-50,-250).draw()
triangle.thatsFilledWith(brown).thatsScaled(4).thatsStrokeColored(black).thatsTranslated(-200, 150).draw()
wintop.thatsFilledWith(green).thatsStrokeColored(black).thatsTranslated(-100,200).draw()