Page 55 - ipp11
P. 55
9. What will be the result of the following expression? (1)
True + False * True
(a) True (b) False (c) 0 (d) 1
10. How many times will the following loop execute? (1)
for x in range(7):
print(x)
(a) 6 (b) 7 (c) 8 (d) Infinite
11. Which loop in Python is used when the number of iterations is known? (1)
(a) do-while loop (b) for loop
(c) while loop (d) None of these
12. Which of the following will remove all the elements from a list? (1)
(a) list1.remove_all() (b) list1=[]
(c) del list1 (d) list1.clear()
13. Which of the following operations is not valid in Python lists? (1)
(a) Subtraction (b) Concatenation (c) Repetition (d) Deletion
14. Which of the following statements about Python dictionaries is true? (1)
(a) Keys in a dictionary must be unique. (b) Dictionaries are ordered in all versions of Python.
(c) A dictionary key can be mutable. (d) Dictionaries cannot store different data types.
15. What will be the output of the following code? (1)
my_dict = {"abc": 123, "def": 456, "ghi": 789}
print(my_dict.items())
(a) ["a", 1, "b", 2, "c", 3]
(b) dict_items([("a", 1), ("b", 2), ("c", 3)])
(c) [("a", 1), ("b", 2), ("c", 3)]
(d) {("a", 1), ("b", 2), ("c", 3)}
16. What does cardinality represent in a table? (1)
(a) The total number of attributes in a table
(b) The total number of relationships in a database
(c) The total number of rows in a table
(d) The type of relationship between tables
17. Which of the following is not an advantage of DBMS? (1)
(a) Data redundancy reduction (b) Faster data retrieval
(c) Higher data inconsistency (d) Improved data security
18. Which of the following is a DML (Data Manipulation Language) command? (1)
(a) ALTER (b) DELETE (c) DROP (d) CREATE
19. Which of the following SQL statements correctly sorts records by Name column in ascending order? (1)
(a) SELECT * FROM students ORDER BY Name ASC;
(b) SELECT * FROM students ORDER BY Name DESC;
(c) SELECT * FROM students SORT BY Name ASC;
(d) SELECT * FROM students GROUP BY Name;
Q. 20 and 21 are Assertion (A) and Reason (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): Virtual Reality (VR) provides an immersive experience by creating a fully digital environment.
Reasoning (R): VR requires special devices such as headsets and motion controllers to interact with the
virtual world. (1)
21. Assertion (A): print() function in Python is used to display the output on the screen.
Reasoning (R): print() function requires at least one argument to work. (1)
P.2