Question: 
Write a python function to count numbers whose oth and nth bits are set.


Model's Code:
def count_Num(n):
    count = 0
    for i in range(n + 1):
        if (i & (1 << 0)) and (i & (1 << n)):
            count += 1
    return count



Sample Correct Code:
def count_Num(n): 
    if (n == 1): 
        return 1
    count = pow(2,n - 2) 
    return count 


Asserts:
assert count_Num(2) == 1
assert count_Num(3) == 2
assert count_Num(1) == 1


Tests:
Test 1 of 3: FAIL: AssertionError()

Test 211 of 974: 155/211 (73.45971563981043%): failed