Wyjaśnienie:
from turtle import *
penup()
goto(25,50)
color('black')
fillcolor('red')
width(2)
pendown()
left(135)
begin_fill()
for _ in range(4):
forward(50)
right(90)
end_fill()
color('black')
left(135)
forward(100)
penup()
right(180)
forward(50)
right(45)
begin_fill()
color('black')
fillcolor('green')
pendown()
for _ in range(4):
forward(30)
right(90)
left(90)
for _ in range(4):
forward(30)
left(90)
end_fill()