Question 1 of 25
Hints left: 3
Q1
In Python, what does the % operator do when used for string formatting?
Q2
What is the purpose of the @wraps decorator in Python's functools module?
Q3
What will be the output of the following Python expression? int(1011)?
Q4
It is not possible for the two's complement value to be equal to the original value in any case.
Q5
What will be the output of the following Python code? s='{0}, {1}, and {2}' s.format('hello', 'good', 'morning')
Q6
What will be the output of the following Python expression if x=22.19? print("%5.2f"%x)
Q7
What is the result of 5 & 6 ^ 6 ?
Q8
What will be the output of the following Python code? class Truth: pass x=Truth() bool(x)
Q9
Which function is used to format strings in Python?
Q10
What will be the output of the following Python expression? ~100?
Q11
To find the decimal value of 1111, that is 15, we can use the function:
Q12
The expression shown below results in an error. print("-%5d0",989)
Q13
What is the result of not (10 > 5) ?
Q14
Which of the following is an f-string in Python?
Q15
What will be the output of the following Python expression? bin(29)
Q16
What is the result of `10 & 5 | 5` ?
Q17
What is the result of 9 ^ (5 & 3) ?
Q18
What is the result of `12 | 10 & 9` ?
Q19
What is the result of 5 ^ 5 ?
Q20
What is the result of not (3 < 5) ?
Q21
What will be the output of the following Python expression if x=15 and y=12? x & y
Q22
In Python, what does the expression {:.2e} do in a formatted string?
Q23
Bitwise . . . . . . . . gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
Q24
What is the result of ~(7 ^ 2) ?
Q25
What is the result of 12 >> 2 ?