13.Just flip out (help)


#1

Why I always get an error "Oops, try again. Make sure your answer is a binary string."
Is there anything wrong ?


a = 0b11101110
mask = 0b100010001
b= a^mask
print bin(b)


#2

Check if it's presented correctly, where is the answer supposed to be? Maybe printing it wasn't how it was to be presented


#3

i am also getting this same problem pease help...


#4

I think it had printed out the correct answer and it also a binary string :frowning:
but still got that annoy error


#5

The instructions say that all bits should be flipped.
"Flip" means to toggle (like a light switch), flipping all bits therefore means changing every bit - which your code doesn't do


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.