Question: 
Write a function to find the count of all binary sequences of length 2n such that sum of first n bits is same as sum of last n bits.


Model's Code:
def count_binary_seq(n):
    from math import comb
    return sum(comb(n, k)**2 for k in range(n + 1))



Sample Correct Code:
def count_binary_seq(n): 
	nCr = 1
	res = 1
	for r in range(1, n + 1): 
		nCr = (nCr * (n + 1 - r)) / r 
		res += nCr * nCr 
	return res 


Asserts:
assert count_binary_seq(1) == 2.0
assert count_binary_seq(2) == 6.0
assert count_binary_seq(3) == 20.0


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 300 of 974: 219/300 (73.0%): success