Computer Science - (A) - 1 / 1
Computer Science - (A) - 1 / 1
Pre-Board Examination - II
COMPUTER SCIENCE
PB-2-2022-23-12(A)
General Instructions :
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given
in Q34 against part c only.
8. All programming questions are to be answered using Python Language only.
SECTION - A
1. Which line of code produces an error? (1)
(A) “Pre” + ‘Board’ (B) 1+ 2
(C) “Pre’+ “Board” (D) ‘1’+ “2”
4. Which of the following will NOT raise an error if the given key is not found in the dictionary (1)
(A) del statement (B) pop()
(C) get () (D) All of these
12. The SQL clause used to retrieve unique values in a field is __________ (1)
a. UNIQUE b. NOT NULL
c. DISTINCT d. IS NULL
13. ________protocol is used to download files. (1)
a. HTTP b. FTP
c. TCP/IP d. HTTPS
14. What will be the following expression evaluated to in Python? (1)
20*2 + (6 // 2) **2 ** 2
a. 41 b. 141
c. 121 d. 52
15. In MySQL, __________ keyword can be used to to put conditions on a group (1)
a. WHERE b. HAVING
c. ORDER BY d. GROUP BY
16. ______ method is used to make the changes permanent in a database through MySQL connec-
tivity. (1)
a. update( ) b. execute( )
c. commit( ) c. cursor( )
17. Assertion (A) (1)
In the following question a statement of Assertion (A) is followed by a statement of Reason (R).
Mark the correct choice as:
COMPUTER SCIENCE-(A)- 1 \ 3
Assertion (A): Python Data types are used to identify the type of data.
Reasoning (R): All categories of operators can be used with objects of all datatypes.
(a) Both Assertion (A) and reason (R) are true and reason (R) is the correct explanation of
Assertion (A).
(b) Assertion (A) and reason (R) are true and reason (R) is not the correct explanation of
Assertion (A).
(c) Assertion (A) is true but reason (R) is false.
(d) Assertion(A) is false but reason (R) is true.
18. In the following question a statement of Assertion (A) is followed by a statement of Reason (R).
Mark the correct choice as:
Assertion (A): CSV is a file format for data storage which looks like a text file.
Reasoning (R): The information is organized with one record on each line and each field is
seperated by a comma.
(a) Both Assertion (A) and reason (R) are true and reason (R) is the correct explanation of
Assertion (A).
(b) Assertion (A) and reason (R) are true and reason (R) is not the correct explanation of
Assertion (A).
(c) Assertion (A) is true but reason (R) is false.
(d) Assertion(A) is false but reason (R) is true.
SECTION - B
19. Rewrite the corrected code after removing the errors from the following code. Also underline the
corrections made: (2)
t1 = 10,20,30,40,50
def F1():
obj1=index(t1(40))
t1[4] = “change”
print(t1.max())
del t1[3]
return
print(F1())
20. What do you mean by protocol. Explain any 2 netwrok protocols. (2)
OR
Differentiate between guided and unguided media. Explain any one from both the categories.
21. Predict the output of the given code : (2)
(i) >>> L1, L2 = [10, 20, 30], [10, 20]
>>> L1 > L2
(ii) >>>str1 = "My School is DPS VK"
>>> str1. partition("DPS")
COMPUTER SCIENCE-(A)- 1 \ 4
(iii)
d = {“a”:1,”b”:2}
str=” ”
for k in d:
str1 += str(d[k])*2 + " "
print(str1[: :-1])
22. Define the following : (2)
(i) Column alias
(ii) Unique constraint
(iii) Relational operator
(iv) Between operator
SECTION - C
26. (a) Consider the following tables - (1)
Business Centre 25
Technology Centre 55
Admin Centre 130
Law Centre 35
Distance between various blocks: