0% found this document useful (0 votes)
2 views

PB 12 CS

This document is a pre-board examination paper for Computer Science for STD XII, consisting of multiple-choice questions, short answer questions, and detailed answer questions. It covers various topics such as functions, data types, SQL, and Python programming concepts. The exam is structured into four sections with a total of 60 questions, including compulsory questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

PB 12 CS

This document is a pre-board examination paper for Computer Science for STD XII, consisting of multiple-choice questions, short answer questions, and detailed answer questions. It covers various topics such as functions, data types, SQL, and Python programming concepts. The exam is structured into four sections with a total of 60 questions, including compulsory questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

STD – XII COMPUTER SCIENCE TIME – 3 Hours

I. Choose the correct answer PRE-BOARD 15x1 = 15


1. The values passed to a function definition are called as
a. parameters b. arguments c. variables d. None of these
2. ___are mandatory to write type annotations in the function definition
a. rec b. keywords c. parentheses d. lists
3. Identify output
for i in range(1, 10, 3):
if (i==8):
break
else:
print(i, end=' ')
for i in range(2, 10, 4):
print(i, end=' ')
else:
print(i, end=' ')
a. 1 4 7 2 6 10 b. 7 2 6 6 c. 10 2 6 10 d. 10 2 6 6
4. The duration for which a variable is alive is called its
a. Scope b. visibility c. lifetime d. All of these

5. for loop can take values from


a. stringb. list c. dictionary d. All of these
6. To accept input, earlier versions of python supported
a. input() b. data_input() c. raw_input() d.accept_input()
7. Consider the code given below and identify the output
def hello():
print ("hello")
return
print (hello())
a. hello b. hello and None c. None and hello d. None
8. str="Welcome"
del str[2]
The above snippet is ______
a. Valid b. Invalid c. Valid at times d. Invalid at times
9. Let list1=[2,4,6,8,10], then print(list1[-2:1]) will result in
a. Error b. [] c.[8] d.[6,8]
10. Which set operation includes all the elements that are in two sets but not the one that are common
to two sets
a. Difference b. Symmetric Difference c. minus d. b and c
11. The expansion of CRLF is
a. Carriage Return Line Form b. Carriage Rate Line Form
c. Carriage Return Line Feed d. Carriage Rotate Line Feed
12. a=[1,4,5,6,7]
del a[0:4]
print(a) what will be the result?
a. Error b. [] c.[5,6] d.[7]
13. Identify the function call statement in the following snippet: if
__name__ == '__main__':
main(sys.argv[1:])
a. __name__ b. __main__ c. main(sys.argv[1:]) d. b and c
14. ____ command executes the SQL command to perform some action
a. execute() b. run() c. cursor() d. all
15. Identify the purpose of the pip list
a. Checks if PIP is installed b. Upgrades to latest PIP version
c. Lists installed packages d. Opens PIP interface
II. Answer any 6 questions. Question No 24 is compulsory 6x2=12
16. What is an abstract data type?
17. What do you mean by Namespace?
18. What are the assignment operators that can be used in Python?
19. What is the difference between SQL and MYSQL
20. Write a SQL statement using DISTINCT keyword
21. Mention the two ways to read a csv file using python
22. What is sys.argv? What does it contain?
23. Which method is used to connect to a database? Give an example
24. Mention the difference between fetchone() and fetchmany()
III. Answer any 6 questions. Question No 33 is compulsory 6x3=18
25. Write a note on Escape Sequence with example
26. str=’BHARATH'
Generate the following pattern using string slicing
B
BH
BHA
BHAR
27. Write a program to illustrate the use of string in range()
28. Explain the purpose of the following functions with syntax
i. index()
ii. copy()
iii pop()
29. What is the difference between write mode and append mode of file operation?
30. Differentiate Python and C++
31. What is the advantage of declaring a column as “INTEGER PRIMARY KEY”?
32. Write the syntax of while loop and explain with an example
33. Write the plot for the given pie chart using the colour combinations given. Science Subject should
be displayed 20% away from the graph

IV. Answer in detail 5x5=25


34. a. Explain the different types of data models
(or)
34 b. Explain the scope of variables in Python with an example.
35 a. Explain the different ways to insert elements into a list in Python
(or)
35 b. Explain the characteristics of DBMS
36 a. Write a Python script to create a table called ITEM with the following specification
Add one record to the table
Name of the database: ABC
Name of the table: ITEM
Column name and specification
Icode Integer and act as primary key

Item Name Character with length 25

Rate Integer

Record to be added 1008, Monitor, 15000

(or)
36 b. Explain the various buttons in Matplotlib Window
37 a. Explain the different types of functions in Python with example.
(or)
37 b. Identify the output of the following program after correcting the errors, if any, found in the
program.
class s:
sum=0
def __init__(self, __n):
self.n=__n
print("Object ", self.n)
def display(self, __value1, value2):
self.__value1=__value1
sum=__value1+value2
print('Result', sum)
v1=int(input('Enter value 1'))
v2=int(input('Enter value 2'))
ob1=s(1)
ob1.display(v1,v2)
ob2=s(12)
ob2.display('v1','v2')
38 a. Write in brief about SQLite and the steps used to use it.
(or)
38 b. Consider the following table structure
SUPPLIER

Suppno Name City Icode SuppQty

S001 Prasad Delhi 1008 100

S002 Anu Bangalore 1010 200

S003 Shahid Bangalore 1008 175

S004 Akila Hyderabad 1005 195

S005 Girish Hyderabad 1003 25

S006 Shylaja Chennai 1008 180

S007 Lavanya Mumbai 1005 325

Write SQL queries to do the following


i. Create Supplier table with Suppno as the primary key
ii. List the names of suppliers in Alphabetical order
iii. List the suppliers who do not reside in Chennai
iv. Identify the total quantity Supplied
v. Count the city wise list of suppliers

You might also like