Question: 
Write a python function to check for even parity of a given number.


Model's Code:
def check_Even_Parity(num):
    return bin(num).count('1') % 2 == 0



Sample Correct Code:
def check_Even_Parity(x): 
    parity = 0
    while (x != 0): 
        x = x & (x - 1) 
        parity += 1
    if (parity % 2 == 0): 
        return True
    else: 
        return False


Asserts:
assert check_Even_Parity(10) == True
assert check_Even_Parity(11) == False
assert check_Even_Parity(18) == True


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

Test 855 of 974: 658/855 (76.95906432748538%): success