0
Q:

nPr python

import math 
def fact(n):  
    if (n <= 1): 
        return 1
    return n * fact(n - 1)  
  
def nPr(n, r):  
    return math.floor(fact(n)/fact(n - r))  
    
print(nPr(4,2))
0

New to Communities?

Join the community