Not printing the correct binary string


Hello evryone :slight_smile:

I get "Oops, try again. The correct binary string was not printed!
" as an error

Replace this line with your code. 

a = 0b110
mask = 0b100
desired = a | mask
a = desired 
print bin(a)


You have changed the initial value of a. This is base code for this exercise:

a = 0b10111011

a = desired 
print bin(a)

Why not just:

print bin(desired)



I thought the error part was due to the fact that I wasn't printing the right string. Forgot that I had edited the a string. Thanks for the help. :sweat_smile:


You're very welcome :slight_smile:


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