title: How to handle ValueError while if int() is provided non-integer
body: <p>Python reads function <code>input()</code> as string.
  Before passing it to my function for division, variables are typecasted into int using <code>int()</code>.
  If one variable is non-int (eg <code>"a"</code>) then how to catch it?</p>
  
  <pre><code>def divideNums(x,y):
      try:
          divResult = x/y
      except ValueError:
          print ("Please provide only Integers...")
      print (str(x) + " divided by " + str(y) + " equals " + str(divResult))
  
  def main():
      firstVal = input("Enter First Number: ")
      secondVal = input("Enter Second Number: ")
      divideNums (int(firstVal), int(secondVal))
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>How to handle typecast of <code>firstVal</code> / <code>secondVal</code> ?</p>