8/14 How can I not do this?


#1

print (0b1110 |0b101)

print 0b1111

Why are those wrong?

I thought 0b1110 is 14 and 0b101 is 5 and so 0b1110 | 0b101 is 0b1111 is 15

Thanks


#2

You are completely right.

Take a look at this part of instruction:

For practice, print out the result of using | on 0b1110 and 0b101 as a binary string.

print bin(0b1110 | 0b101)

#3

Thanks very much !

Knew it'd be something simple just didn't know what


#4

You're very welcome :smile: