Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

CREDENCE HIGH SCHOOL

PREBOARD EXAMINATION
Class XII - 2022-23
Computer Science (083)
ANSWER KEY
Maximum Marks: 70 Time Allowed: 3 hours
General Instructions:

1. This question paper contains five sections, Section A to E.


2. All questions are compulsory.
3. Write options with answers for MCQ questions- Section A
4. Section A have 18 questions (Q1-Q18) carrying 01 mark each. (18marks)
5. Section B has 07 Very Short Answer type questions (Q19-Q25) carrying 02
marks each. (14marks)
6. Section C has 05 Short Answer type questions (Q26-Q30) carrying 03 marks
each. (15marks)
7. Section D has 03 Long Answer type questions (Q31-Q33) carrying 05 marks
each. (15marks)
8. Section E has 02 questions (Q34-Q35) carrying 04 marks each.(8marks)
9. All programming questions are to be answered using Python Language only.

SECTION A
(Q1-Q18) 18X1=18Marks
1. Which of the following is not a keyword? 1
a) eval
b) assert
c) nonlocal
d) pass
Answer: a Explanation: eval can be
used as a variable.

2. What will be the data type of the expression 12/5==0? 1


a) True
b) False
c) bool
d) float
3. Consider a list num = [5, 10, 15, 20], which of the following will result in an error:- 1
a) num[0] += 3
b) num += 3
c) num *= 3
d) num[1] = 45

1
4. Give the output of the following L=[1,2,3,4,5,6,7,8,9] 1
print(L.count(2))
print(L.index(2)

Ans:
1
1
5. Consider the given expression: 1
8 and 13 > 10
Which of the following is the correct value of the expression?
a) True
b) False
c) None
d) NULL
6. Which is the correct dictionary declaration? 1
a)d1={1:'January',2='February',3:'March'}
b)d2=(1:'January',2:'February',3:'March'}
c)d3={1:'January',2:'February',3:'March'}
d)d4={1:January,2:February,3:March}
7. A Programmer is working in Python program which is function oriented. He/ She is 1
using the functions already available in python. These functions are called:
a) User Defined Function
b) Modular Function
c) In-built Function
d) Reusable Function

8. What is the default mode of opening a file in python? 1


a)read
b)write
c)append
d)read and write
9. The correct syntax of seek() is: 1
(a) file_object.seek(offset [, reference_point])
(b) seek(offset [, reference_point])
(c) seek(offset, file_object)
(d) seek.file_object(offset)

10. Which of the following Python codes will result in an error? 1


obj = ‘a’
a)pickle.dumps(obj)
b)pickle.dumps(obj,3)
c)pickle.dumps(obj,3,True)
d)pickle.dumps(‘a’,2)

2
11. The ------------------------is established in circuit switching before actual communication. 1
(a) Switch
(b) Link
(c) Protocol
(d) Hub

12. Mr.John is a small businessman who runs Hardware. He has been experiencing problems 1
with his small accounting department, which he depends on to provide sales reports .
Mr.John wants to share information between his 7 computer stations and have one central
printing area. What type of network would you recommend to Mr.John?
(a) MAN
(b) LAN
(c) WAN
(d) SAN
13. URL stands for ------------------ 1
(a) Uniform Research Limited
(b) Uniform Resource Locator
(c) Uniform Resource Labs
(d) Uniform Research Locator.
14. Which protocol is used for transferring files over a TCP/IP network? 1
a) FTP
b) SMTP
c) PPP
d) HTTP
15. The SELECT statement when combined with __________ clause, returns records without 1
repetition.
(a) DESCRIBE
(b) UNIQUE
(c) DISTINCT
(d) NULL
16. Which function is used to display the total number of records from table in a database? 1
(a) sum(*)
(b) total(*)
(c) count(*)
(d) return(*)
Q17 and 18 are ASSERTION AND REASONING 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 and R is not the correct explanation for
c) A is True but R is False
d) A is false but R is True
17. Assertion (A):- print(f1()) is a valid statement even if the function f1() has no 1
return statement.
Reasoning (R):- A function always returns a value even if it has no return statement.

c) A is True but R is False

3
18. Assertion (A): If L is a list, then L+=range(5) is an invalid statement. 1
Reason (R): Only a list can be concatenated to a list.

a) Both A and R are true and R is the correct explanation for A

SECTION B
(Q19-Q25) 7X2=14 Marks
19. Mohit has written a code to input a positive integer and display its factorial. His code is 2
having errors. Rewrite the correct code and underline the corrections made. (factorial
of a number n is the product 1x2x3. . .n)

Ans:
n= int(input(“Enter a positive integer: ”))
f=1
for i in range(1,n+1):

20. Write two points of difference between HTML and XML. 2


[OR]
Write two points of difference between LAN and MAN.

Ans: The key difference between HTML and XML is that HTML displays data and describes
the structure of a webpage, whereas XML stores and transfers data. XML is a standard
language which can define other computer languages, but HTML is a predefined language
with its own implications.

OR

LAN stands for Local Area Network. It is a computer network that interconnects
computers within a small area like in an office building or a school. On the other hand,
MAN stands for Metropolitan Area Network. It is a computer network that interconnects
computer within a city or a large campus. MAN can be defined as an outgrowth of LAN.
MAN covers larger area than LAN such as small towns, cities, etc. MAN connects two or
more computers that reside within the same or completely different cities. MAN is
expensive and should or might not be owned by one organization.

4
21. (a) Write a Python statement to display alternate characters of a string, named 1
my_exam.
For example,
if my_exam="Russia Ukraine"
The statement should display Rsi kan

(b) Write the output of the code given below:


1
d1 = {"name": "Aman", "age": 26}
d2 = d1.pop('name')
print(d1, d2)

Ans: (a): my_exam[::2]

an Ans: (b): {"age": 26} Aman

an

22. Can a table in an RDBMS have multiple candidate keys? Can it have multiple Primary 2
keys? Give an example to support your answer.

There can be multiple Candidate keys in one table. Each candidate key can qualify
as Primary Key. Primary Key is a column or combination of columns that uniquely
identify a record. Only one candidate key can be a primary key.

Each table can only have one primary key. Access can automatically create a
primary key field for you when you create a table, or you can specify the fields that
you want to use as the primary key.

23. Write the purpose of the following devices. 1


(i) Network Interface Card 1
(ii) Repeater

Ans:
A network interface card (NIC) is a hardware component, typically a circuit board or
chip, which is installed on a computer so it can connect to a network.

A repeater is a device that amplifies or adds to incoming electrical signals


and retransmits them, in order to compensate for transmission losses. A
repeater receives a signal and retransmits it at a higher level or higher
power, or onto the other side of an obstruction, so that the signal can cover
longer distances.

24. Predict the output of the Python code given below: 2

5
Ans: 34@53@[13, 24]

[OR]

Ans:
34@53@[13,24]

[OR]
[4,7]
25. If a column score in a table match has five entries, viz. 30,65,NULL,40,NULL, then what 2
will be the output of the following query?

Select count(*), avg(score) from match;

[OR]

Write two differences between HAVING and WHERE clauses in SQL.

Ans: 5
7

6
[OR]

SECTION C
Q26-30 5X3=15 Marks
26. 1

Ans:
An (a) Degree of the given table is: 6
Cardinality of the given table is: 5
“EID” is the suitable one.
Ans

27. Write a function reverseFile() in Python, which should read the content of a text 3
file “TESTFILE.TXT” and display all its line in the reverse order.
Example: If the file content is as follows:

7
It rained yesterday.
It might rain today.
I wish it rains tomorrow too.
I love Rain.

The RainCount() function should display the output as:


.yadretsey deniar tI
.yadot niar thgim tI
.oot worromot sniar ti hsiw I
.niaR evol

[OR]

28. 3

8
9
10
29
3

11
30 3

[OR]

12
13
SECTION D
Q31-Q33 3 X 5=15Marks
31. 5

14
Ans:
Development block is the most appropriate to house the server as it has the maximum
number of computers.
Firewall

Ethernet Cable
Ans: Switch/hub will be placed in all blocks to have connectivity within the block.

32. 5

Ans:

15
[OR]

Ans:
@ss@ss

16
17
33. 5

Ans:
(a)
Binary files can be used to store any data; for example, a JPEG image is a binary
file designed to be read by a computer system. The data inside a binary file
is stored as raw bytes, which is not human readable.

18
(b)

SECTION E
Q34-Q35 2X4=8 Marks
34. 4

19
35. 4

20
ALL THE BEST

21

You might also like