































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
































SECTION 1: PYTHON PROGRAMMING & DATA TYPES (Questions 1-30) Q1. What is the output of print(type(10 / 2))?
Correct Answer: B Rationale: The // operator performs floor division (integer division). It returns the quotient without the remainder, so 10 // 3 evaluates to 3. Q4. What is the output of print(2 ** 3)?
Correct Answer: B Rationale: ** is the exponentiation operator (e.g., 2 ** 3 = 8). ^ is bitwise XOR, not exponentiation. Q13. What does the append() method do when called on a list?
Correct Answer: B Rationale: == is the equality comparison operator. = is assignment. != means not equal. === is not valid in Python. Q19. What is the output of print(5 + 3 * 2)?
Q27. What is the output of print("Hello" + "World")?
Q30. Which of the following is a valid way to create an empty list?
Correct Answer: B Rationale: The + operator concatenates strings. "Hello" + " " + "World" combines to produce "Hello World". Q36. Which statement about Python sets is TRUE?
Rationale: y = x makes y reference the same list object as x. Appending to y also changes x. This is a reference assignment, not a copy. Q44. Which of the following correctly creates a dictionary?
Correct Answer: B Rationale: .copy() creates a shallow copy of the list. Modifying b does not affect a. Q52. What is the result of bool("False")?
Correct Answer: A Rationale: insert(1, 99) inserts 99 at index 1 , shifting existing elements to the right. The list becomes [1, 99, 2, 3]. Q55. What is the result of 10 % 3?