Question #84904

How do I create this shape: a hexagon with a pentagon in it with a square in it with a triangle in it

Expert's answer

from turtle import *

setup()

x = 0

y = 0


def figure(n):

goto(x, y)

for z in range(n):

fd(200)

rt(360/n)


figure(6)

figure(5)

figure(4)

figure(3)


exitonclick()

LATEST TUTORIALS
APPROVED BY CLIENTS