Page 1
Meghalaya Board of School Education
QUESTION
PAPERS
Page 2
Total No. of Printed Pages—11
HS/XII/A.Sc.Com/CSc/25
2025
COMPUTER SCIENCE
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 is the output of the following code?
t=(10, 20, 30, 40, 50, 50, 70)
print(t[5 : –1])
(i) Blank output()
(ii) (50, 70)
(iii) (50, 50, 70)
(iv) (50,)
/227 [ P.T.O.
Page 3
( 2 )
(b) If return statement is not used inside the function,
the function will return
(i) 0
(ii) none
(iii) an arbitrary integer
(iv) error ! functions in Python must have a return
statement
(c) The readlines() method returns
(i) an str
(ii) a list of lines
(iii) a list of single characters
(iv) a list of integers
(d) When a stack is empty and an element’s deletion is
tried from the stack, it is called a/an
(i) overflow
(ii) underflow
(iii) extraflow
(iv) noflow
(e) Which of the following types of table constraints will
prevent the entry of duplicate rows?
(i) Unique
(ii) Distinct
(iii) Foreign key
(iv) NULL
HS/XII/A.Sc.Com/CSc/25/227 [ Contd.
Page 4
( 3 )
(f) To run an SQL query from within a Python program,
you may use <cursor>._____ method.
(i) query()
(ii) execute()
(iii) run()
(iv) All of the above
2. Answer the following questions in not more than 2 (two) or
3 (three) sentences each : 1×6=6
(a) Convert the following Infix expression to Prefix
expression :
A * (B + C )
(b) If you give statement del D[<key>], what happens to
the value in key : value pairs?
(c) What is variable scope?
(d) What is the role of filemode in file open()?
(e) What is the purpose of using FTP?
(f) What is wrong with the following statement?
SELECT * FROM Employee
WHERE grade=NULL;
Write the correct form of the above SQL statement.
HS/XII/A.Sc.Com/CSc/25/227 [ P.T.O.
Page 5
( 4 )
3. Answer any six of the following questions : 2×6=12
(a) Evaluate the following Postfix expression :
50, 60, +, 20,10, -, *
(b) Differentiate between Seek() and Tell().
(c) Consider a function with the following header :
def info (object, spacing=10, collapse=1):
Identify the correct function call(s). State the
reason(s), if the function call(s) is incorrect.
(i) info (spacing=20)
(ii) info (obj2, 12)
(d) Write any two advantages of saving data in binary
form.
(e) Define NameError and ImportError.
(f) What are the basic operations that can be performed
on stack?
(g) Find and write the output of the following code :
for Name in [‘Jayes’, ‘Ramya’, ‘Taruna’, ‘Suraj’]:
print(Name)
if Name[0]==‘T’:
break
else:
print(‘Finished!’)
print(‘Got it’)
HS/XII/A.Sc.Com/CSc/25/227 [ Contd.
Page 6
( 5 )
(h) Fill in the missing lines with appropriate word for
creating a CSV file :
import _____
fp=Open(“Anyfile.CSV”, “_____”)
Wrt=csv._____ (fp)
_____.Writerow ([1, ‘Mary’])
fp.Close()
4. Answer any three of the following questions : 2×3=6
(a) What is a transmission media? List any two types of
wired and wireless transmission media.
(b) How is IP address different from MAC address?
(c) What is a Modem? What are two types of modems? 1+1=2
(d) Differentiate between HTTP and TCP/IP.
(e) Differentiate between Server and Web Server.
5. Answer any two of the following questions : 2×2=4
(a) What is SQL constraint? Mention any two
constraints. 1+1=2
(b) Write the SQL commands to do the following : 1+1=2
(i) To view the structure of the table ‘student’
(ii) To delete the table ‘student’
(c) What is the use of ORDER BY clause? Write query
that sorts the data of a table ‘student’ on the basis of
marks in descending order. 1+1=2
HS/XII/A.Sc.Com/CSc/25/227 [ P.T.O.
Page 7
( 6 )
6. Answer the following questions : 3×4=12
(a) Explain the use of global keyword used in a function
with the help of a suitable example. 3
Or
Predict the output of the following code fragment :
1+1+1=3
def check(n1=1, n2=2):
n1=n1+n2
n2+=1
print(n1, n2)
check()
check(2,1)
check(3)
(b) Write a program to read a text file and display the
number of vowels and consonants in the file.
Or
Write a program to create a Binary file to store
student data (Rollno, Name, Marks). Obtain data from
user and write 5 records into the file.
(c) What is the use of raise statement? Write a code to
accept two numbers and display the quotient.
Appropriate exception should be raised if the user
enter the second number as zero(0). 1+2=3
Or
What is the utility of the following? 1+1+1=3
(i) Default arguments
(ii) Keyword arguments
(iii) Positional arguments
HS/XII/A.Sc.Com/CSc/25/227 [ Contd.
Page 8
( 7 )
(d) Write a program in Python that defines and calls the
user-defined function to accept and add data of an
employee to a CSV file ‘record.CSV’. Each record
consists of a list with field elements as empid, name
and salary to store employee id, employee name and
employee salary.
Or
Explain try_except_finally block with an example.
7. Answer any one of the following questions : 3
(a) What is network topology? Write any two advantages
and disadvantages of star topology.
(b) Define the following network devices briefly : 1+1+1=3
(i) Repeater
(ii) Ethernet card
(iii) Switch
(c) Write a short note on circuit switching and packet
switching.
HS/XII/A.Sc.Com/CSc/25/227 [ P.T.O.
Page 9
( 8 )
8. Answer the following questions : 3×3=9
(a) Differentiate between Primary Key and Foreign Key.
Identify the Primary Key and Foreign Key from the
tables given below :
Table : STUDENT Table : PROJECT
Student_ID Project_ID
Name Project_Name
Class Student_ID
Or
Write the SQL queries with reference to the following
tables :
Table : PRODUCT Table : CLIENT
P_ID (PK) C_ID (PK)
Product_Name Client_Name
Manufacturer City
Price P_ID (FK)
(i) To display Product_Name and Client_Name of
those clients whose City is ‘Delhi’
(ii) To display the details of Products whose price is
in the range of 50 to 100
(iii) To increase the price of all products by 10
HS/XII/A.Sc.Com/CSc/25/227 [ Contd.
Page 10
( 9 )
(b) What are the different categories of SQL functions?
Explain COUNT() and SUM(). 1+2=3
(c) What is the significance of GROUP BY Clause in SQL
query? Write a query to display the difference of
highest and lowest salary of each department from
empl table, having maximum salary>4000. 1+2=3
Or
Write a Python database connectivity script that
deletes records from ‘category’ table of database ‘item’
that have product name ‘ICECREAM’. 3
9. Answer the following questions : 4×2=8
(a) Write a program in Python that defines and calls the
user-defined function to search the records of the
furniture whose price is more than 10000 in a binary
file ‘furniture.dat’ having field fid, fname and fprice.
Or
Write a Python program using function
DISPLAYWORDS() to read lines from a text file
STORY.TXT, and display those words, which are less
than 4 characters.
HS/XII/A.Sc.Com/CSc/25/227 [ P.T.O.
Page 11
( 10 )
(b) Convert the following infix expression into its
equivalent postfix expression showing stacks status
after every step in tabular form :
((A - B ) * (D / E )) / (F * G * H )
Or
Write a program using functions in Python,
MakePush (package) and MakePop (package) to add a
new package and delete a package from a list of
package descriptions.
10. Kabir wants to write a program in Python to insert the
following record in the table named Student in MySQL
database, School :
• rno(Roll number)–integer
• name(Name)–string
• DOB (Date of birth)–Date
• Fee–float
Note the following to establish connectivity between
Python and MySQL :
• Username_root
• Password_tiger
• Host_localhost
Display all records from the table Student. 4
HS/XII/A.Sc.Com/CSc/25/227 [ Contd.
Page 12
( 11 )
Or
Given the following table :
Table : CABHUB
VCode Vehicle- Make Color Capacity Charges
Name
100 Innova Toyota WHITE 7 15
102 SX4 Suzuki BLUE 4 14
104 C-Class Mercedes RED 4 35
105 A-Star Suzuki WHITE 3 14
108 Indigo Tata SILVER 3 12
Give the output of the following queries based on the
above table :
(i) SELECT COUNT (DISTINCT Make) FROM
CABHUB;
(ii) SELECT MAX (Charges), MIN (Charges) FROM
CABHUB;
(iii) SELECT VehicleName FROM CABHUB WHERE
Capacity=4;
(iv) SELECT COUNT(*), MAKE FROM CABHUB;
HHH
HS/XII/A.Sc.Com/CSc/25/227 K25—2350
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