Page 61 - ipp11
P. 61
12. Which method is used to add an element at the end of a list? [1]
(a) append() (b) insert() (c) extend() (d) add()
13. What will be the output of the following code? [1]
t = (1, 2, 3, 2)
print(t.index(2))
(a) 1 (b) 3 (c) 2 (d) Error
14. Which of the following statements is TRUE about dictionary keys? [1]
(a) Keys must be unique and immutable.
(b) Keys can be duplicated in the same dictionary.
(c) Keys can be mutable data types like lists and dictionaries.
(d) Keys can be changed once the dictionary is created.
15. What will be the output of the following code? [1]
lst = [1, 2, 3]
lst.extend([4, 5])
print(lst)
(a) [1, 2, 3, [4, 5]] (b) [1, 2, 3, 4, 5]
(c) [4, 5] (d) [1, 2, 3, 4]
16. In the relational model, what does a table represent? [1]
(a) Tuple (b) Attribute (c) Relation (d) Schema
17. What does the following SQL command do? [1]
ALTER TABLE Students ADD COLUMN Email VARCHAR(100);
(a) Changes the name of the table (b) Adds a new row to the table
(c) Adds a new column called Email (d) Changes the data in a column
18. Which of the following SQL queries will update the salary of employee with ID 101 to 50000? [1]
(a) UPDATE Employees SET Salary = 50000 WHERE ID = 101;
(b) MODIFY Employees SET Salary = 50000 FOR ID = 101;
(c) CHANGE Employees SET Salary = 50000 WHERE ID = 101;
(d) SET Employees Salary = 50000 WHERE ID = 101;
19. Which of the following command is used to modify the structure of an existing table? [1]
(a) UPDATE (b) MODIFY (c) ALTER TABLE (d) CHANGE
Q20 and Q21 are Assertion(A) and Reasoning(R) based questions. Mark the correct choice as:
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true but R is not the correct explanation for A.
(c) A is True but R is False.
(d) A is False but R is True.
20. Assertion (A): IoT devices are always connected to the internet to collect and exchange data. [1]
Reasoning (R): IoT enables interconnection of physical devices through sensors and networks.
21. Assertion (A): Comments in Python are written using the # symbol. [1]
Reasoning (R): Python ignores everything written after # on a line.
SECTION B (7 × 2 = 14 Marks)
22. (a) Differentiate between RAM and ROM. [2]
OR
(b) What is grid computing?
P.7