A problem exercise to creating a star using series of triangles and squares. The image is divided by…