title: Python Verifying if input is int and greater than 0
body: <p>So I need to ask the client to enter the variable again if it is not integer or is less or equal to 0. I can not let it get an program error and end it.</p>
  
  <pre><code>def enter_amount():
  
  
  amount=input("Enter amount:")
  while (not isinstance(amount, int)) or amount&lt;=0:
      amount=input("The amount can't be negative, please try again:")
  return amount
  </code></pre>
  
  <p>Tried this, and it always fails the test. If you have any ideas I would be grateful. </p>