Answer:
import turtle
def drawhouse(t):
# find the length of diagonal of a square with side = 100
# formula: diagonal = sqrt(2) * side
diagonal = 100 * (2 ** 0.5)
data = [(100, 135), (diagonal, -135), (100, -135), (diagonal, -135), (100, -45), (diagonal / 2, -90),
(diagonal / 2, -45), (100, 0)]
for dist, angle in data:
t.forward(dist)
t.left(angle)
def main():
t = turtle.Turtle()
drawhouse(t)
turtle.done()
main()