human
Program to calculate value of nCr | Python 3 program To calculate The Value Of nCr.
Returns factorial of n.
Driver code"
How can the above be solved in Python?

Give me a code to program to calculate value of nCr and the other steps required?
assistant
#Here is code to program to calculate value of nCr and the other steps required.
 def nCr ( n , r ) :
	return ( fact ( n ) / ( fact ( r ) * fact ( n - r ) ) )
def fact ( n ) :
	res = 1
	for i in range ( 2 , n + 1 ) :
		res = res * i
	return res
n = 5
r = 3
print ( int ( nCr ( n , r ) ) )