A Bit of this Or a Bit of That - error


<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
I keep getting this error:

RuntimeError: maximum recursion depth exceeded

<What do you expect to happen instead?>
Please post the solution because I have no idea where I’m going wrong.


print bin(0b1110 | 0b101)

<do not remove the three backticks above>

your code is good, try refreshing your page

Thanks, I never had a problem with that before.

1 Like

hello @rubyace13596
your code is worked for me…,

print (bin(0b1110 & 0b101))

my code is exactly the same as the code above and I get exactly the same answer but I get this error message; “Oops try again. It looks like the value printed isn’t correct.”
Can someone plz help I’m banging my head off a wall

code in OP does not work for me either

your suppose to put
print bin(0b1110 & 0b101)

1 Like

i did this and its not the same like yours but its work can i know y?
print int(“0b1110”,2)
print int(“0b101”,2)
print 0b1110 & 0b101
print bin(4)

try this

print bin(0b1110&0b101)

I tried the exact code from the original post and it worked fine.

Thank being said, when I read the part of the instructions that says “Try to do it on your own without using the | operator if you can help it.” I thought that the correct answer would not have the | operator so I did the or in my head and used:

print bin(0b1111)

which also works and allowed me to move on to the next exercise.