title: Python 3 Graphics (Drawing a star)
body: <p>I am currently using Python Graphics. (This is not the same as "Python Turtle", you can download the site package via a google search of "Python Graphics".) After searching for a while on how to draw a star, I couldn't find any information on this. </p>
  
  <p>This is the only way I have figured out how it would work: </p>
  
  <pre><code>from graphics import *
  
  def main():
      win = GraphWin('Star', 600, 600)
      win.setCoords(0.0, 0.0, 600.0, 600.0)
      win.setBackground('White')
  
      p1 = win.getMouse()
      p1.draw(win)
      p2 = win.getMouse()
      p2.draw(win)
      p3 = win.getMouse()
      p3.draw(win)
      p4 = win.getMouse()
      p4.draw(win)
      p5 = win.getMouse()
      p5.draw(win)
      p6 = win.getMouse()
      p6.draw(win)
      p7 = win.getMouse()
      p7.draw(win)
      p8 = win.getMouse()
      p8.draw(win)
      p9 = win.getMouse()
      p9.draw(win)
      p10 = win.getMouse()
      p10.draw(win)
      vertices = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]
      print(vertices.getPoints())
  
      # Use Polygon object to draw the star
      star = Polygon(vertices)
      star.setFill('darkgreen')
      star.setOutline('darkgreen')
      star.setWidth(4)  # width of boundary line
      star.draw(win)
  
  main()
  </code></pre>
  
  <p>This works but not too well as I can't get a perfect star and I always have to guess where I am clicking. </p>