LEVEL 4Bitwise operators
PYTHON, PLOT TWIST! Q32
Bitwise NOT
What’s the output? Think first. Trust your brain.
question_32.pyPython 3
1print(~5)2print(~0)3print(~(-5))
Flip the bits.

The minus sign is part of the deal.
a very python momentRead each Python snippet, predict what it prints, then reveal the answer and the plot twist behind it. Built for classrooms and curious students.