I’m at the bitwise operators lessons now but I have a simple question:
def check_bit4(input): mask = 0b1000 desired = input & mask if desired > 0: return "on" else: return "off"
What does the parameter
input do? It doesn’t have any arguments passed to it as far as I’m aware. So how can it compare with the variable
(This is my whole code)