title: ValueError: invalid literal for int() with base 10: 'string'
body: <p>I'm trying to write a code in which 2 digits are checked if they are digits or not. Everything works fine when input are digits. Problem occurs when one digit is treated as str. Then I got an error: <code>ValueError: invalid literal for int() with base 10: 'any str typed in keyboard'</code></p>
  <p>Here is my code:</p>
  <pre><code>def dividingResult(x, y):
      result = x/y
      return result
  
  def checkDigit1(x):
      if x.isdigit():
          return x
      else:
          print('It is not a digit')
          programStart()
  
  def checkDigit2(y):
      if y.isdigit():
          return y
      else:
          print('It is not a digit')
          programStart()
  
  def programStart():
      print(&quot;type digit 1&quot;)
      digit1 = input()
  
      checkDigit1(digit1)
  
      print(&quot;type digit 2&quot;)
      digit2 = input()
  
      checkDigit2(digit2)
  
      print(dividingResult(int(digit1), int(digit2)))
  
  programStart()
  </code></pre>