Hello folks! I am doing something wrong but not sure what. I keep getting "Oops, try again. Your function fails on check_bit4(0b0). It returns "on" when it should return "off".". The code works.
Replace this line with your code. def check_bit4(input): # the "4" means the fourth bit from the right num = 0b1100 mask =0b1010 desired = num & mask if desired>0: #desired = 0b1000 return "on" else: return "off" print check_bit4(num&mask)