Introduction to Bitwise Operators


#1
Hi Everyone,

This error message appears when I run my code for the “Introduction to Bitwise Operators code.”

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-intermediate-en-KE1UJ/0/3?curriculum_id=4f89dab3d788890003000096
<In what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again. Make sure to write the answer in binary using the “0bxxx” format.
<What do you expect to happen instead?>
Are my binary operations correct? Do I need to use the “print” command?

Thanks for your assistance and time.

``` one = 0b001 two = 0b10 three = 0b11 four = 0b100 five = 0b101 six = 0b110 seven = 0b0111 eight = 0b1000 nine = 0b1001 ten = 0b1010 eleven = 0b1011 twelve = 0b11 + 0b1001
<do not remove the three backticks above>

#2

Hi @u_isa,

On this line …

twelve = 0b11 + 0b1001

… Codecademy wants you to use the binary format for the number 12 directly instead of using addition.


#3

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