from turtle import *

shape('turtle')
setup(450, 350)
pensize(2) 

def p(x, y):
    penup(), setpos(x, y)
    pendown()
    setheading(0)

def rect(x1, y1, x2, y2):
    p(x1, y1)
    d = abs(x2 - x1)
    h = abs(y2 - y1)
    begin_fill()
    fd(d), rt(90)
    fd(h), rt(90)
    fd(d), rt(90)
    fd(h)
    end_fill()

#крыша
p(-200, 50)
color('brown','yellow')
begin_fill(), lt(30)
fd(200), rt(60)
fd(200), rt(150)
fd(346), end_fill()
#дом
color('brown','Chocolate')
rect(-200, 50, 146, -150)
#окно
color('blue','lightblue')
rect(-150, 0, -50, 50)
#дверь
color('red','coral')
rect(60, -20, 120, -150)

done()