Problem Solving And Python Programming Set 22
On This Page
This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 22
Q1 | + 3 % 5
- 4
- 7
- 2
Q2 | Which of the following operators has its associativity from right to left?
- +
- //
- %
- **
Q3 | 55+2/2)
- 43
- 44
- 22
- 23
Q4 | +4.00, 2**4.0
- (6.0, 16.0)
- (6.00, 16.00)
- (6, 16)
- (6.00, 16.0)
Q5 | Which of the following is the truncation division operator?
- /
- %
- //
Q6 | **(3**2) (2**3)**2 2**3**2
- 64, 512, 64
- 64, 64, 64
- 512, 512, 512
- 512, 64, 512
Q7 | /4/2, 8/(4/2)
- (1.0, 4.0)
- (1.0, 1.0)
- (4.0. 1.0)
- (4.0, 4.0)
Q8 | +9*((3*12)-8)/10
- 30.0
- 30.8
- 28.4
- 27.2
Q9 | 2. Hence the result of this expression is 27.2.
- 4.7 – 1.5
- 7.9 * 6.3
- 1.7 % 2
- 3.4 + 4.6
Q10 | //6%3, 24//4//2
- (1,3)
- (0,3)
- (1,0)
- (3,1)
Q11 | +int(2.39)%2)
- 5.0
- 5 c) 4.0
- d) 4
Q12 | +2**5//10
- 3
- 7
- 77
Q13 | The expression 2**2**3 is evaluates as: (2**2)**3.
- true
- false
Q14 | Which of the following expressions results in an error?
- int(1011)
- int(‘1011’,23)
- int(1011,2)
- int(‘1011’)
Q15 | Which of the following represents the bitwise XOR operator?
- &
- ^
- !
Q16 | x8)
- ‘0bx1000’
- 8
- 1000
- ‘0b1000’
Q17 | x75
- 115
- 116
- 117
- 118
Q18 | It is not possible for the two’s complement value to be equal to the original value in any case.
- true
- false
Q19 | Bitwise gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
- or
- and
- xor
- not
Q20 | ^12
- 2
- 4
- 8
- 12
Q21 | -2)+bin(12^4)
- 0b10000
- 0b10001000
- 0b1000b1000
- 0b10000b1000
Q22 | Which of the following expressions can be used to multiply a given number ‘a’ by 4?
- a<<2
- a<<4
- a>>2
- a>>4
Q23 | R operator. Hence the output of the code shown above is: 20 10.
- 1011011
- 11010100
- 11101011
- 10110011
Q24 | ?
- 101
- -101
- 100
- -100
Q25 | <20) and not(10>30)
- true
- false
- error
- no output