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