title: Python Binomial Coefficient
body: <p></p>
  
  <pre><code>import math
  x = int(input("Enter a value for x: "))
  y = int(input("Enter a value for y: "))
  
  if y == 1 or y == x:
      print(1)
  
  if y &gt; x:
      print(0)        
  else:
      a = math.factorial(x)
      b = math.factorial(y)
      div = a // (b*(x-y))
      print(div)  
  </code></pre>
  
  <p>This binomial coefficient program works but when I input two of the same number which is supposed to equal to 1 or when y is greater than x it is supposed to equal to 0.</p>