Question: 
Write a python function to count hexadecimal numbers for a given range.


Model's Code:
def count_Hexadecimal(start, end):
    count = 0
    for num in range(start, end):
        if any(c in 'abcdef' for c in hex(num)[2:]):
            count += 1
    return count



Sample Correct Code:
def count_Hexadecimal(L,R) :  
    count = 0;  
    for i in range(L,R + 1) : 
        if (i >= 10 and i <= 15) : 
            count += 1;  
        elif (i > 15) : 
            k = i;  
            while (k != 0) :  
                if (k % 16 >= 10) : 
                    count += 1;  
                k = k // 16;  
    return count;  


Asserts:
assert count_Hexadecimal(10,15) == 6
assert count_Hexadecimal(2,4) == 0
assert count_Hexadecimal(15,16) == 1


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

Test 107 of 974: 81/107 (75.70093457943925%): failed