41. Evaluate the expression given below if A = 16 and B = 15. A % B // A A. 0.0 B. 0 C. 1.0 D. 1 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
42. What will be the output of the following Python expression? print(4.00/(2.0+2.0)) A. Error B. 1.0 C. 1.00 D. 1 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
43. What is the result of 10 - 3 + 2 ? A. 5 B. 9 C. -9 D. -1 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: Addition and subtraction have the same precedence and are evaluated left to right.
44. What will be the output of the following Python expression? 24//6%3, 24//4//2 A. (1,3) B. (0,3) C. (1,0) D. (3,1) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
45. What is the result of 8 - 6 / 2 ? A. 4 B. 5 C. 1 D. 2 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: Division has higher precedence, so 6 / 2 is evaluated first, then subtracted from 8.
46. What is the result of 5 % 3 ** 2 ? A. 1 B. 2 C. 0 D. 4 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Exponentiation has higher precedence, so 3 ** 2 is evaluated first, then modulo.
47. What is the result of 12 // (4 * 2) ? A. 1 B. 2 C. 3 D. 0 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Parentheses have the highest precedence, so the expression inside them is evaluated first.
48. Which operator has the highest precedence in Python? A. + B. * C. / D. ** Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D Solution: The exponentiation (**) operator has the highest precedence.
49. What is the result of 3 ** 2 // 3 ? A. 1 B. 3 C. 2 D. 27 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Exponentiation has higher precedence, so 3 ** 2 is evaluated first, then floor division.
50. What is the result of 10 / 2 ** 2 * 2 ? A. 5 B. 2 C. 10 D. 2.5 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Exponentiation has higher precedence, so 2 ** 2 is evaluated first, then multiplication and division follow.