from turtle import *
# Set up the screen
setup(width=500, height=500)
screensize(canvwidth=500, canvheight=500)
speed(0)
hideturtle()
# Set up the grid
grid_size = 20
for i in range(-25, 26):
penup()
goto(i * grid_size, -25 * grid_size)
pendown()
goto(i * grid_size, 25 * grid_size)
penup()
goto(-25 * grid_size, i * grid_size)
pendown()
goto(25 * grid_size, i * grid_size)
# Set up the house
penup()
goto(0, 0)
pendown()
# Roof
fillcolor("blue")
begin_fill()
goto(10 * grid_size, 5 * grid_size)
goto(5 * grid_size, 10 * grid_size)
goto(0, 5 * grid_size)
end_fill()
# Chimney
penup()
goto(2 * grid_size, 8 * grid_size)
pendown()
fillcolor("orange")
begin_fill()
goto(2 * grid_size, 5 * grid_size)
goto(3 * grid_size, 5 * grid_size)
goto(3 * grid_size, 8 * grid_size)
end_fill()
# Smoke
penup()
goto(2.5 * grid_size, 9 * grid_size)
pendown()
color("white")
circle(1 * grid_size, 360, 3)
# Walls
penup()
goto(0, 5 * grid_size)
pendown()
fillcolor("yellow")
begin_fill()
goto(10 * grid_size, 5 * grid_size)
goto(10 * grid_size, 0)
goto(0, 0)
end_fill()
# Windows
penup()
goto(3 * grid_size, 3 * grid_size)
pendown()
fillcolor("white")
begin_fill()