On This Page

This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 4

Q1 | The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.
  • true
  • false
Q2 | + 3 % 5
  • 4
  • 7
  • 2
Q3 | Which of the following operators has its associativity from right to left?
  • +
  • //
  • %
  • **
Q4 | 55+2/2)
  • 43
  • 44
  • 22
  • 23
Q5 | +4.00, 2**4.0
  • (6.0, 16.0)
  • (6.00, 16.00)
  • (6, 16)
  • (6.00, 16.0)
Q6 | Which of the following is the truncation division operator?
  • /
  • %
  • //
Q7 | **(3**2) (2**3)**2 2**3**2
  • 64, 512, 64
  • 64, 64, 64
  • 512, 512, 512
  • 512, 64, 512
Q8 | /4/2, 8/(4/2)
  • (1.0, 4.0)
  • (1.0, 1.0)
  • (4.0. 1.0)
  • (4.0, 4.0)
Q9 | +9*((3*12)-8)/10
  • 30.0
  • 30.8
  • 28.4
  • 27.2
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 | 1)?
  • 1011
  • 11
  • 13 d) 1101
Q15 | Which of the following expressions results in an error?
  • int(1011)
  • int(‘1011’,23)
  • int(1011,2)
  • int(‘1011’)
Q16 | Which of the following represents the bitwise XOR operator?
  • &
  • ^
  • !
Q17 | x8)
  • ‘0bx1000’
  • 8
  • 1000
  • ‘0b1000’
Q18 | What will be the output of the following Python expression?0x35 | 0x75
  • 115
  • 116
  • 117
  • 118
Q19 | It is not possible for the two’s complement value to be equal to the original value in any case.
  • true
  • false
Q20 | Bitwise                    gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
  • or
  • and
  • xor
  • not
Q21 | ^12
  • 2
  • 4
  • 8
  • 12
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