This is just one of many possible solutions:
whenclickedsetsidesto50cleargotox:-180y:-50setpensizeto3repeat6pendownpointindirection0repeat2movesidesstepsturn45degreesmovesidesstepsturn180-45degreesrepeat2movesidesstepsturn45degreesmovesidesstepsturn180-45degreesmovesidesstepsturn45degreesrepeat2movesidesstepsturn90degreesmovesidesstepsturn180-90degreespenuppointindirection90movesqrtofsides*sides+sides*sidesstepspointindirection180movesidessteps
Back to programming challenge