Page 1
Meghalaya Board of School Education
QUESTION
PAPERS
Page 2
Total No. of Printed Pages—11
HS/XII/A.Sc.Com/CSc/24
2024
COMPUTER SCIENCE
( Theory )
Full Marks : 70
Time : 3 hours
The figures in the margin indicate full marks for the questions
General Instructions :
(i) Write all the answers in the Answer Script.
(ii) Attempt multiple choice questions and very short
answer-type questions serially.
(iii) Attempt all parts of a question together at one place.
1. Choose the correct option from the following : 1×6=6
(a) What will be the output of the following code?
alist=[]
for i in range (1, 4) :
alist.append(i)
print(alist)
(i) [1]
(ii) [1, 2]
(iii) [1, 2, 3]
(iv) [1, 2, 3, 4]
/27 [ P.T.O.
Page 3
( 2 )
(b) What is a variable defined inside a function referred
to as?
(i) A static variable
(ii) A global variable
(iii) A local variable
(iv) An automatic variable
(c) The readlines() method returns
(i) a list of lines
(ii) a list of single characters
(iii) a list of integers
(iv) None of the above
(d) Which of the following argument types can be skipped
from a function call?
(i) Positional arguments
(ii) Keyword arguments
(iii) Named arguments
(iv) Default arguments
(e) The _____ clause of SELECT query allows us to select
only those rows in the result that satisfy a specific
condition.
(i) WHERE
(ii) FROM
(iii) HAVING
(iv) LIKE
HS/XII/A.Sc.Com/CSc/24/27 [ Contd.
Page 4
( 3 )
(f) The aggregate function sum() when used in a query, a
condition can be constructed with _____ clause.
(i) GROUP BY
(ii) WITH
(iii) WHERE
(iv) HAVING
2. Answer the following questions in not more than 2 (two) or
3 (three) sentences each : 1×6=6
(a) Explain type casting by giving an example.
(b) Write the utility of keyword argument in function call
statement.
(c) Convert the following infix expression to prefix
expression :
(A - B ) * C
(d) What is the purpose of tell() function?
(e) Gopi Krishna is using a table Employee. It has the
following columns :
Code, Name, Salary, Deptcode
Write an SQL query to display the maximum salary
on department codewise.
(f) In packet switching, how does data packet travel to
the destination?
HS/XII/A.Sc.Com/CSc/24/27 [ P.T.O.
Page 5
( 4 )
3. Answer any six of the following questions : 2×6=12
(a) Explain the workings of break and continue
statements in the following codings by giving an
output for each :
Program 1 :
for i in range (1, 5):
print(i)
break
Program 2 :
for i in range (1, 5):
if(i%2==0):
continue
print(i)
else:
print(i)
(b) When is global statement used? When is its use not
recommended?
(c) What is pickling process? What are the two methods
for reading and writing pickle module?
(d) What is the difference between writerow() and write-
rows() function of a .csv file?
(e) What is exception? What is exception handling?
(f) Write the equivalent infix expression for
10, 3, *, 7, 1, -, *, 23, +
(g) How can a function return multiple values?
(h) Explain ValueError and ZeroDivisionError.
HS/XII/A.Sc.Com/CSc/24/27 [ Contd.
Page 6
( 5 )
4. Answer any three of the following questions : 2×3=6
(a) What are the components of a computer network?
(b) Write a short note on ARPnet.
(c) In networking, what is WAN? How is it different from
LAN?
(d) Explain any two of the following devices :
(i) Switch
(ii) Repeater
(iii) Router
(iv) Bridge
(e) Differentiate between the terms Domain name and
URL in the context of World Wide Web.
5. Answer any two of the following questions : 2×2=4
(a) Write a query to list the details of all employees whose
annual salary is between 25,000–40,000. Consider
the table EMP having columns ID, F_NAME,
LAST_NAME and SALARY.
(b) Write an SQL statement to modify the Last_Name of
an employee having ID equals to 3 of the EMP table to
‘Gautam’.
(c) Differentiate between Primary key and Unique key.
Write down the names of clauses of SQL SELECT
command used for sorting of data and grouping of
data on a particular column.
HS/XII/A.Sc.Com/CSc/24/27 [ P.T.O.
Page 7
( 6 )
6. Answer the following questions : 3×4=12
(a) Explain function header. What is the difference
between the function calls CalSum() and CalSum(x,
y)? Also name the different types of arguments used
in a function header. 1+1+1=3
Or
Write the output of the code given below : 3
X=8
def FN(Y, Z=3):
global X
X=Z-Y**3
print(X)
FN(3, 6)
FN(Z=7, Y=1)
(b) Predict the output of the following code for the given
function calls :
(i) divide(2, 1)
(ii) divide(2, 0)
(iii) divide(“2”, “1”)
def divide(X, Y) :
try :
result=X/Y
except ZeroDivisionError :
print(“division by zero!”)
else :
print(“result is”, result)
finally :
print(“executing finally clause”)
HS/XII/A.Sc.Com/CSc/24/27 [ Contd.
Page 8
( 7 )
Or
“Every syntax error is an exception but every
exception cannot be a syntax error.” Justify the
sentence.
(c) Write a program to read a text file and display the
number of lower-case and upper-case letters present
in the file.
Or
Trace the flow of execution for the following program :
1. def sum (x=10):
2. print (x+2+6)
3. def add (a, b)
4. return a+b
#main
5. num=2
6. p=sum()
7. q=add (num, 90)+add(2, 2)
8. print(p, q)
(d) Write down the complete open statements for opening
the following files :
(i) A text file “example.txt” in both read and write
mode.
(ii) A binary file “bfile.dat” in write mode.
(iii) A text file namely “story.txt” in append mode.
HS/XII/A.Sc.Com/CSc/24/27 [ P.T.O.
Page 9
( 8 )
7. Answer the following question : 3
What are the three categories of wired media? Explain
them briefly.
Or
What is switching? Discuss packet and circuit
switching technologies.
Or
What is protocol? Name and explain at least three
network protocols used.
8. Answer the following questions : 3×3=9
(a) Write the SQL queries with reference to the following
tables :
Table : DEPT Table : WORKER
D_Code (PK) W_Code (PK)
Department Name
City DOJ
DOB
Gender
D_Code (FK)
(i) To display W_Code, Name, Gender in descending
order of W_Code
(ii) To display Name, Department, City whose
W_Code < 1004
(iii) To count and display Male worker who have
DOJ > ‘1986-01-01’
HS/XII/A.Sc.Com/CSc/24/27 [ Contd.
Page 10
( 9 )
Or
Differentiate between candidate key and alternate
key. Identify the candidate key and alternate key from
the table below :
Table : Project
Roll_No
Project
Student_ID
Mobile_No
(b) Explain the difference between the three SQL queries
given below as per the table empl :
Table : empl
Emp_no E_Name JOB Salary
1 Smith Clerk 800
2 Anya Salesman 1600
3 Seth Manager 2985
4 Bina Salesman 1250
5 Amir Manager 2850
(i) mysql>SELECT COUNT(*) FROM empl;
(ii) mysql>SELECT COUNT (JOB) FROM empl;
(iii) mysql>SELECT COUNT (DISTINCT JOB) FROM
empl;
(c) Explain the aggregate functions max(), avg() and
sum() with suitable examples.
Or
What is SQL join? Explain equi-join with example.
HS/XII/A.Sc.Com/CSc/24/27 [ P.T.O.
Page 11
( 10 )
9. Answer the following questions : 4×2=8
(a) Write a program to create a binary file to store
Employee data (Emp_ID, Name, Salary). Obtain at
least three records from the user.
Or
Write a function in Python that counts the number of
words starting with letter ‘S’ in a text file “Poem.txt”.
(b) Convert ((A+B)*C/D+E**F)/G into postfix notation.
Or
What is a stack? Explain the PUSH and POP
operations that can be performed on stack with
example.
10. Write a Python code to connect a MySQL database ‘CLUB’
and insert into MEMBER (M_ID, Name, Activity) values
(‘M1001’, ‘Amina’, ‘swimming’). 4
Or
Given the following table :
Table : Sports
No. Name Class Game Grade
1 Sameer 7 Cricket B
2 Sujit 8 Tennis A
3 Kamal 7 Swimming B
4 Venna 7 Tennis C
5 Archana 9 Basketball A
6 Arpit 10 Cricket D
Give the output of the following queries based on the
above table :
(i) SELECT Name, Game FROM Sports WHERE
Grade=‘A’;
HS/XII/A.Sc.Com/CSc/24/27 [ Contd.
Page 12
( 11 )
(ii) SELECT COUNT (DISTINCT Game) FROM Sports
WHERE Class<9;
(iii) SELECT Name FROM Sports WHERE Grade
BETWEEN ‘A’ and ‘C’;
(iv) SELECT DISTINCT Game FROM Sports; 4
HHH
HS/XII/A.Sc.Com/CSc/24/27 24K—2390
Page 13
AglaSem Earn While You Learn Program!
Share your recent question papers with us and get paid!
अपने हाल के न प हम भेज और कमाएँ!
To participate, email us with the following details:
भाग लेने के लए हम न न ववरण के साथ ईमेल कर:
- Your Name
- Your Class
- Your Board
- Details of the Question Papers you have
आपके पास उपल ध न प का ववरण
Our team will reach out to you with the next steps.
हमार ट म आगे क या के लए आपसे संपक करे गी।
Email: support@
Page 14
Study Materials
Notes
Model Papers Class 6 Notes
Sample Papers Class 7 Notes
Half Yearly Sample Papers Class 8 Notes
Class 9 Notes
Important Resources
Class 10 Notes
Periodic Table
Class 11 Notes
Writing Skills / Formats
Maps of India / World Class 12 Notes
Books and Solutions
NCERT Books
NCERT Book Solutions
HC Verma Chapter Wise Solutions
RD Sharma Solutions
CGBSE Solutions