I'm not a mathematician and I don't understand how to interpret the three dots between multiplication symbols; x...x in this formula for equating possible combinations:
Can somebody tell me how to interpret it please?
def choose(n,k):
a=((n-k+2)/2)
c=((n-k+1)/1)
b=n/k
for i in range(1,k-1):
b=b*((n-i)/(k-i))
return (int(b*a*c))
Running choose(4, 2) … Error: choose(4, 2) has wrong value 12, expected 6
Users browsing this forum: No registered users and 1 guest