Write a recursive function to calculate binomial coefficients. This function sho
ID: 640533 • Letter: W
Question
Write a recursive function to calculate binomial coefficients. This function should take in two integer arguments, n and k, and will return an integer.
The simplest way to write this code is to have a function named binomial_coefficient() that returns the integer that represents the binomial coefficient.
The function will need to check if n is equal to k (and return 1), if k equals 0 (and return 1), or if we need to recursively call the binomial_coefficient function. n should be greater than or equal to zero and k should be greater than or equal to zero AND less than or equal to n.