Press the green flag and choose how many sides you want your shape to be. Use the space key to clear any lines drawn previously. You can also change the size of the lines by using the up and down arrow keys.
Documentation done in comments next to code.