0% found this document useful (0 votes)
7 views7 pages

Preboard #3

This document is a preboard examination paper for Computer Science for the academic year 2020-2021 at Sophia Senior Secondary School, Kota JN. It consists of two parts: Part A includes multiple-choice and case study questions, while Part B contains descriptive questions, all focusing on Python programming and SQL. The exam is structured to assess students' understanding of computer science concepts and their practical application in programming.

Uploaded by

aim_aim11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views7 pages

Preboard #3

This document is a preboard examination paper for Computer Science for the academic year 2020-2021 at Sophia Senior Secondary School, Kota JN. It consists of two parts: Part A includes multiple-choice and case study questions, while Part B contains descriptive questions, all focusing on Python programming and SQL. The exam is structured to assess students' understanding of computer science concepts and their practical application in programming.

Uploaded by

aim_aim11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SOPHIA SENIOR SECONDARY SCHOOL KOTA JN.

PREBOARD #3 2020-2021
SUB: COMPUTER SCIENCE (083)
Maximum Marks: 70 Time Allowed: 3 hours

General Instructions:
1. This question paper contains two parts A and B.
2. Each part is compulsory.
3. Both Part A and Part B have choices.
4. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b. Section – II has two case studies questions. Each case study has 4 case-based
subparts. An examinee is to attempt any 4 out of the 5 subparts.

5. Part - B is Descriptive Paper. Part- B has three sections.


a. Section-I is short answer questions of 2 marks each
b. Section-II is long answer questions of 3 marks each
c. Section-III is very long answer questions of 5 marks each
6. All programming questions are to be answered using Python Language only

Part-A
Section-I
Select the most appropriate option out of the options given for each question.
Attempt any 15 questions from question no 1 to 21.
1 Find the invalid identifier from the following: 1
a) Comp b) comp c) _comp d) 83comp
2 Given the list li=[1,2,5,6,7,8,9,55,66] ,write the output of print(li[::3]) 1
3 What is cursor? 1
4 Which among the following list of operator has the highest precedence? 1
a) << ,>> b) ** c) | d) %
5 What will be the output of following python code? 1
Cs=(45,67,89)
P=Cs*2
print(p)
(a) (45,67,89) (b) (45 ,45, 67, 67, 89 ,89)
( c)(45,67,89,45,67,89) (d) Error
6 What would the following code print ? 1
D={‘spring’ :’ autumn’ , ’autumn’ : ’fall’ ,’fall’ :’spring’}
print(D[‘autumn’])
(a) autumn (b) fall
(c ) spring (d) Error

7. What is the output of the following code?


T=(10,20,30,40,50,60,70)
Print(T[5:-1])
a) blank output()
b) (60,70)
c) (50,60,70)
d) (60,)
8. To generate a random floating number in the range 0 to 100,_________function is 1
used.
9. What is VoIP? 1
10. Stealing someone else intellectual work and representing it as own ,is 1
called__________________
a) intellectual steal b) Pluckism c) Plagiarism d) Pickism
11. Which command defines its columns, integrity constraint in create table: 1
a) Create Table command b) Drop table command
c) Alter table command d) All of these
12. Where and Having clauses can be used interchangeably in select queries? 1
True b) False c) only in views d) with order by
13. Which of the following is not a SQL aggregate function? 1
a) Avg b) Sum c) With d) Min
14. Find output of following code 1
txt="Digital Footprint is generated due to online activity"
a) print(txt[2:8].upper( ) )
15. Which cable connectors are used to connect a cable from a router’s console port to a 1
PC?
a) RJ-11 b)RJ-12 c)RJ-45 d)none
16. Which of the following can add only one value to a list? 1
a)add() b) append() c) extend() d) none of these
17 Write the correct output of the following String operations. 1
Str1=’waha’
print(Str1[:3]+”Bhyi”+Str1[-3:])
18. Which operator tests a column for the absence of data (i.e NULL value)? 1
a) Exist operator b) NOT Operator
b) IS operator d) None of these
19. Write the expanded form of NFS. 1

20. Which of the following is not a legal constraint for a create table command? 1
a) Primary key b) Foreign Key c) Unique Key d) Distinct
21 Network device which connect a dissimilar networks. 1
a)hub b)switch c)router d) Gateway

Section-II
Both the Case study-based questions are compulsory. Attempt any 4 sub parts from
each question. Each question carries 1 mark
22 Consider the following tables Product and Client. Write SQL commands for the

statement (i) to (v) .


(a) Identify the attribute best suitable to be declared as a primary key, in PRODUCT 1
TABLE and Foreign Key in CLIENT Table.
(b) Write the degree and cardinality of the table CLIENT. 1
( c)To display the details of those Clients whose city is Delhi. 1
(d) To display the details of Products whose Price is in the range of 50 and 100 (Both 1
values included).
(e) To display the ClientName, City from table Client, and ProductName and Price 1
from table Product, with their corresponding matching P_ID.

23. Ranjan Kumar of class 12 is writing a program to create a CSV file “user.csv” which
will contain user name and password for some entries. He has written the following
code. As a programmer, help him to successfully execute the given task.
import _____________ # Line 1

def addCsvFile (UserName,PassWord): # to write / add data into the CSV

f=open(' user.csv','________') # Line 2

newFileWriter = csv.writer(f)

newFileWriter.writerow([UserName,PassWord])

f.close()

#csv file reading code

def readCsvFile(): # to read data from CSV file

with open(' user.csv','r') as newFile:

newFileReader = csv._________(newFile) # Line 3

for row in newFileReader:

print (row[0],row[1])

newFile.______________ # Line 4

addCsvFile(“Arjun”,”123@456”)
addCsvFile(“Arunima”,”aru@nima”)
addCsvFile(“Frieda”,”myname@FRD”)
readCsvFile() #Line 5
(a) Name the module he should import in Line 1. 1
(b) In which mode, Ranjan should open the file to add data into the file 1
(c) Fill in the blank in Line 3 to read the data from a csv file. 1
(d) Fill in the blank in Line 4 to close the file. 1
(e) Write the output he will obtain while executing Line 5. 1

Part – B

Section-I
24. Evaluate the following expressions: 2
(i) b+c>=a or not a+c>2*c and a+b<4*c if a=5,b=3,c=2
(ii) z+= x//y+x%y+y//x+y%x if x=5,y=3,z=2
25. Rewrite the following code in Python after removing all syntax error(s). Underline each 2
correction done in the code.
STRING=""HAPPY NEW YEAR"
for S in range[0,8]:
print(STRING(S))
print( S+STRING)
26. Find and write the output of the following Python code: 2
def fun(s):
k=len(s)
m=" "
for i in range(0,k):
if(s[i].isupper()):
m=m+s[i].lower()
elif s[i].isalpha():
m=m+s[i].upper()
else:
m=m+'bb'
print(m)
fun('school2@com')

27. Study the following program and select the possible output(s) from the options (i) to (iv) 2
following it. Also, write the maximum and the minimum values that can be assigned to
the variable Y.
import random
X= random.random()
Y= random.randint(0,4)
print(int(X),":",Y+int(X))

(i) 0:0 (ii) 1 : 6 (iii) 2:4 (iv) 0:3


28. What is default argument? Explain with examples. 2
Or
What is scope of variable ? What are global or local variables?
29. Write advantages and disadvantages of Coaxial cable. 2
Or
What are advantages and disadvantages of optical fiber cable?
30. Define bandwith. Write units of bandwith. 2
31. Differentiate between Primary key and Candidate key. 2
32. Write any two commands of DDL in SQL.Write the significance of using NOT NULL as 2
field specification while creating the table.
33. Differentiate between UNIQUE and DEFAULT constraints. 2

Section- II

34. Define a function avg( ) that will find the average value from a list of integers. 3
35. Write a program that will read the content of the text file THREE.txt and display the lines 3
starting with ‘A’.
Or
Write a function in python to count the number of words in a text file ‘acdc.txt’ starting
with an alphabet ‘B’ or ‘b’

36. Define pop( ) function on a stack STK where the function returns the deleted item. 3
Or
Define delete( ) function on a list LST.
37. Write output of following SQL queries based on the relations FACULTY and 3
COURSES.

FACULTY
F_ID Fname Lname Hire_date Salary

102 Amit Mishra 12-10-1998 12000

103 Nitin Vyas 24-12-1994 8000

104 Rakshit Soni 18-5-2001 14000

105 Rashmi Malhotra 11-9-2004 11000

106 Sulekha Srivastava 5-6-2006 10000

COURSES
C_ID F_ID Cname Fees

C21 102 Grid Computing 40000

C22 106 System Design 16000

C23 104 Computer Security 8000

C24 106 Human Biology 15000

C25 102 Computer Network 20000

I) select Fname, Lname, Cname, Fees where Faculty.F_Id = Courses.F_Id and


Cname =’System Design’
II) select Cname from Courses where Fees=(select min(Fees) from Courses)
III) select * from FACULTY where Fname like ‘_a%

38. Refer the table FACULTY and COURSES in question no 37 and write SQL queries for 5
the following questions:-
(i)To display details of those Faculties whose salary is greater than 12000.
(ii)To display the details of courses whose fees is in the range of 15000 to 50000
(both values included)
(iii)To increase the fees of all courses by 500.
(iv)To display details of those courses which are taught by ‘Sulekha’.
(v)To arrange the content of the COURSES table in decreasing order of Fees.

39. Riana Medicos Centre has set up its new centre in Dubai. It has four buildings as shown 5
in the diagram given below:
Distances between various buildings are
as follows:

Accounts to Research Lab 55 m


Accounts to Store 150 m
Store to Packaging Unit 160 m
Packaging Unit to Research Lab 60 m
Accounts to Packaging Unit 125 m
Store to Research Lab 180 m
Number of computers:
Accounts 25
Research Lab 100
Store 15
Packaging Unit 60
As a network expert, provide the best possible answer for the following queries:
(i)Suggest the type of network established between the buildings.
(ii)Suggest the most suitable place (i.e., building) to house the server of this
organization.
(iii)Suggest the placement of the Hub/Switch with justification
(iv)Suggest most suitable medium to connect the buildings:-
(a) Coaxial Cable (b) Optical Fibre (c) UTP Cables (d) Wi-Fi
(v)Suggest a system (hardware/software) to prevent unauthorized access to or from the
network.

40. Write a program in python that will write records of 5 employees in the binary data file 5
employee.dat. (Format of record is : {empid – name-salary}) and display the records of
those employees whose salary is greater than Rs. 10,000/-. Sample data is given
below: -
{'empid':1001,'name':'John','salary':12000}
{'empid':1002,'name':'Sonu','salary':15000}
{'empid':1003,'name':'Deepak','salary':8000}
{'empid':1004,'name':'Rony','salary':18000}
{'empid':1005,'name':'Tina','salary':7000}
Or
Write a function show_st( ) in python that will read the content of the binary data file
student.dat and display the records of those students whose marks is greater than
90.The program should also diplay the number of students and average marks obtained
by the students.
Format of record is : (Roll – Name-Marks)

You might also like