

MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Python knowledge and support exam preparation. Choose a topic below to get started.
1. |
What will be the output of the following Python code if a=10 and b =20? |
A. | 10 20 |
B. | 10 10 |
C. | 20 10 |
D. | 20 20View Answer |
Answer» D. 20 20View Answer | |
2. |
Which of the following expressions can be used to multiply a given number ‘a’ by 4? |
A. | a<<2 |
B. | a<<4 |
C. | a>>2 |
D. | a>>4 |
Answer» B. a<<4 | |
3. |
Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0. |
A. | 10 |
B. | 2 |
C. | 1 |
D. | 0 |
Answer» D. 0 | |
4. |
Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1. |
A. | OR |
B. | AND |
C. | XOR |
D. | NOT |
Answer» D. NOT | |
5. |
The one’s complement of 110010101 is: |
A. | 001101010 |
B. | 110010101 |
C. | 001101011 |
D. | 110010100 |
Answer» B. 110010101 | |
6. |
It is not possible for the two’s complement value to be equal to the original value in any case. |
A. | True |
B. | False |
Answer» C. | |