You mustn't close the window of turtle until it done and you can add this line to make it not close until you close it by your self
turtle.done() # put in end