Task : Write a GraphicsProgram subclass that draws a pyramid consisting of bricks arranged in horizontal rows, so that the number of bricks in each row decreases by one as you move up the pyramid.
But all I have been able to generate is right angled pyramid.
Below is the code I wrote.
Any help will be greatly appreciated.