Professional Documents
Culture Documents
G12cs-Ms-Preboard1 2022-23
G12cs-Ms-Preboard1 2022-23
PREBOARD EXAMINATION
Class XII - 2022-23
Computer Science (083)
ANSWER KEY
Maximum Marks: 70 Time Allowed: 3 hours
General Instructions:
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.
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
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.
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.
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):
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
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.
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.
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?
[OR]
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.
[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