Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A program uses the bitwise operators on two small whole numbers. What does the program print?
Python Programming
Hard
High School (9–10)
Python Basics › Operators and Expressions
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program uses the bitwise operators on two small whole numbers.
x = 6 y = 3 print(x & y, x | y, x ^ y, ~x, x << 1 >> 2)
What does the program print?
2 7 5 -6 3
2 5 7 -7 3
2 7 5 -7 3
2 7 5 -7 6
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A while loop adds up the digits of a number, from the right. The loop has a break and an else block. What does the program print?
A word is changed with replace() and searched with rfind() and find(). Then two of its letters are changed with ord() and chr(). What does the program print? →
More on
Python Basics › Operators and Expressions
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
A number has three digits, for example 472…
Medium
A student wrote these three formulas. Each one has a mistake in the brackets…
Medium
Work out each sum on paper, using the order of Python.
Easy
5000 rupees is put in a bank at 6 percent a year, with the interest added every year…
Hard
All problems on this topic →