13 blocks using the Pen extension function and nested loops. The rules to observe for this program to work is that the turn multiplied by the repeat value must equal 360. In this example, the repeat is 10 so turn is 36 degrees. The repeat and turn values can obviously be edited to draw different shapes from circle (repeat 360, turn 1) to any value you choose.
Must check that the move distance is quite short for shapes that have more sides. For example, the "move" value for a square cannot exceed 170. This is because exactly as a drawing robot is not able to detect when it has run out of paper, the Pen function in Scratch does not recognise by default the edges of the output screen.