title: Drawing Stars with turtle in python
body: <p>I need to write a function that draws random stars based upon the question of how many stars the person wants. a=color,b=length and c,d are the starting coordinates. I am not really sure where I am going wrong any tips,hints or help would be appreciated.</p>
  
  <pre><code>import turtle
  from random import*
  def star(a,b,c,d):
      x=5
      y=0
      turtle.color(a)
      turtle.begin_fill()
      turtle.penup()
      turtle.goto(c,d)
      turtle.pendown()
      while x&gt;0:
          turtle.forward(b)
          turtle.right(144)
          turtle.forward(b)
          x-=1
      turtle.end_fill()
  
  star('red',100,0,0)
  
  def random_color():
      randvar=randrange(0,5)
      if randvar==0:
          return ('red')
      elif randvar==1:
          return ('blue')
      elif randvar==2:
          return ('green')
      elif randvar==3:
          return ('yellow')
      else:
          return ('black')
  
  def length():
      randvar=randrange(5,71)
  
  def x():
      randvar=randrange(-280,281)
  
  def y():
      randvar=randrange(-200,201)
  
  def night_sky():
     z=int(input('How many stars do you want?'))
     a=random_color
     b=length
     c=x
     d=y
     while z&gt;0:
         star(a,b,c,d)
         z-=1
  </code></pre>