Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- # Define P(3, 2) function
- def p(n, r):
- # Calculate the binomial coefficient
- binomial_coefficient = np.math.comb(n, r)
- # Return the binomial coefficient
- return binomial_coefficient
- # Print the value of P(3, 2)
- print(p(3, 2))
Advertisement
Add Comment
Please, Sign In to add comment