What will be the output of the following Python expression? 0x35 | 0x75 a) 115 b) 116 c) ...
View Question
What is the value of the following Python expression?
bin(0x8)
What is the value of the following Python expression? bin(0x8) a) ‘0bx1000’ b) ...
View QuestionWhich of the following expressions results in an error?
a) int(1011) b) int(‘1011’,23) c) int(1011,2) d) int(‘1011’) Answer: c Explanation: The expression int(1011,2) results in ...
View Question
What will be the output of the following Python expression if x=15 and y=12?
x & y
What will be the output of the following Python expression if x=15 and y=12? x & y a) ...
View QuestionTo find the decimal value of 1111, that is 15, we can use the function:
a) int(1111,10) b) int(‘1111’,10) c) int(1111,2) d) int(‘1111’,2) Answer: d Explanation: The ...
View Question
What will be the output of the following Python expression?
int(1011)?
What will be the output of the following Python expression? int(1011)? a) 1011 b) 11 c) 13 d) 1101
View Question
What will be the value of x in the following Python expression, if the result of that expression is 2?
x>>2
What will be the value of x in the following Python expression, if the result of that expression ...
View Question
What will be the output of the following Python expression?
bin(29)
What will be the output of the following Python expression? bin(29) a) ‘0b10111’ b) ‘0b11101’ c) ...
View Question
What will be the output of the following Python code snippet if x=1?
x<<2
What will be the output of the following Python code snippet if x=1? x<<2 a) 8 b) 1 c) 2 d) 4
View Question