A Bit of this Or a Bit of That - error


#1



I keep getting this error:

RuntimeError: maximum recursion depth exceeded


Please post the solution because I have no idea where I'm going wrong.


print bin(0b1110 | 0b101)


#2

your code is good, try refreshing your page


#3

Thanks, I never had a problem with that before.


#4

hello @rubyace13596
your code is worked for me..,

print (bin(0b1110 & 0b101))


#5

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


#7

code in OP does not work for me either


#8

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


#9

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)


#10

try this

print bin(0b1110&0b101)


#11

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.