11. What is the result of "Hello" in "Hello, World!" ? A. True B. False C. None D. Error Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: The in operator checks if the first string is a substring of the second string.
12. What does the '//' operator do when used with negative numbers? A. Returns the positive quotient B. Returns the negative quotient C. Rounds down to the nearest integer D. Rounds up to the nearest integer Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: The // operator performs floor division, rounding down.
13. Which is the correct operator for power(xy)? A. X^y B. X**y C. X^^y D. None of the mentioned 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
14. Operators with the same precedence are evaluated in which manner? A. Left to Right B. Right to Left C. Can't say D. None of the mentioned 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
15. What is the answer to this expression, 22 % 3 is? A. 7 B. 1 C. 0 D. 5 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
16. What is the result of len("python") ? A. 6 B. 5 C. 7 D. "python" Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: The len() function returns the length of a sequence, such as a string.
17. What is the result of the expression 7 % 3 ? A. 2.33 B. 2 C. 0.333 D. 1 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D Solution: The % operator calculates the remainder of the division.
18. What is the order of precedence for the arithmetic operators in Python? A. +, *, /, - B. /, *, +, - C. *, /, +, - D. +, -, *, / Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: The order of precedence is: *, / (highest), +, - (lowest).
19. The expression Int(x) implies that the variable x is converted to integer. A. True B. False 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
20. What is the result of 10 / 2 ? A. 5.0 B. 5 C. 2 D. 0.5 Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: Division of two integers results in a floating-point number.