title: Python - Input Validation
body: <p>I'm looking to create code which requires an integer greater than 2 to be input by a user before continuing. I'm using python 3.3. Here's what I have so far:</p>
  
  <pre><code>def is_integer(x):
      try:
          int(x)
          return False
      except ValueError:
          print('Please enter an integer above 2')
          return True
  
  maximum_number_input = input("Maximum Number: ")
  
  while is_integer(maximum_number_input):
      maximum_number_input = input("Maximum Number: ")
  
      print('You have successfully entered a valid number')
  </code></pre>
  
  <p>What I'm not sure about is how best to put in the condition that the integer must be greater than 2. I've only just started learning python but want to get into good habits.</p>