Проблемы начинаются с строчки def dom(): и дальше
from turtle import*
speed(70)
def fon():
penup()
goto(-250,-250)
pendown()
color('green')
begin_fill()
fd(700)
lt(90)
fd(200)
lt(90)
fd(700)
lt(90)
fd(200)
end_fill()
penup()
color('blue')
goto(-250,-50)
lt(90)
pendown()
begin_fill()
fd(700)
lt(90)
fd(400)
lt(90)
fd(700)
lt(90)
fd(400)
end_fill()
def solnce():
penup()
goto(180,180)
lt(90)
color('yellow', 'red')
pendown()
begin_fill()
for i in range(40):
fd(75)
lt(130)
end_fill()
fon()
solnce()
def dom():
color('orange','black')
pensize(10)
penup()
goto(-100, -50)
pendown()
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
dom()
exitonclick()