title: How do I check a value entered?? Python 3.4
body: <pre><code>def p_parameter(p):
  
       if p &lt; 10 or p &gt; 100:
          int(input("Please try again: "))
          newp = p
          return newp
      else:
          newp &lt;10 or newp &gt;100
          input("Good bye")
          bye()
  
  def main():
  
          speed(0)
          R=100
          r=4
          p=int(input("Please enter a number between 10 and 100: "))
          p_parameter(p)
          t_iter(R,r,p)
          Xcord(R,r,p,t_iter(R,r,p))
          Ycord(R,r,p,t_iter(R,r,p))
          input("Hit enter to close porgram")
          bye()
  
  main()
  </code></pre>
  
  <p>Here is my code for a program which draws a spirograph. The program runs fine but what I have posted here is my attempt to have the user enter a value between 10-100 for <code>p</code>. </p>
  
  <p>What I want to do is check to see if <code>p</code> is &lt; 10 or <code>p</code> > 100. If it is, then give the user a chance to re-enter a new value of <code>p</code> and use that value as long as it fits the allowed limits. After the second check if the user still has entered an incorrect value of <code>p</code> I want the program to close. </p>
  
  <p>The problem is that it checks for 'p' then asks for <code>p</code> again but it only take the first value of 'p', and does not preform the second check or give <code>p</code> its new value.</p>