Navy Education Society Conduct of Common Preboard Examination For For Navy Children Schools For Class 12 Computer Science

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

NAVY EDUCATION SOCIETY

CONDUCT OF COMMON PREBOARD EXAMINATION FOR AY 2020-21


FOR NAVY CHILDREN SCHOOLS
FOR CLASS 12
COMPUTER SCIENCE (083)

TIME : 3 HOURS TOTAL NO OF PAGES : 10 MAXIMUM MARKS:70

General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I contains short answer questions, to be answered in one word or
one line and MCQs.
b. Section – II has two case studies questions. Each case study has 4 case-
based sub-parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive section.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each in which two question
have internal options.
b. Section-II is long answer questions of 3 marks each in which two questions
have internal options.
c. Section-III is very long answer questions of 5 marks each in which one
question has internal option.
6. All programming questions are to be answered using Python Language only

Part - A
Section-I
Attempt any 15 questions from question no 1 to 21.

1 Find the invalid identifier(s) from the following 1


a) None b) true c) _2file d) myfile#1
2 Consider the list 1
alist=[“SIPO”, [1,3,5,7] ]
What will be the output of
print(alist[0][1], alist[1][1] )
3 ------------ function returns the current position of file pointer 1

4 Identify the valid arithmetic operator(s) in Python from the following. 1


a) ** b) != c) // d) and
1
5 Suppose a tuple T is declared as T = (10, 12, 43, 39), What will be the 1
output of the following ?
print( T[ -3: 3 ])

6 What is the output of the following ? 1


D = {1 : 10, 2 : '2', '1' : 1, '2' : 3}
print(D['1'] )

a) Error b)10 c) 1 d)3

7 If T is a tuple containing 1
(“these”, [“are”, “a”, “few”, “words”], “that” ) , What does the following
expression evaluate to ?
“a” in T[1][0]

8 Name the built-in mathematical function / method that is used to return an 1


absolute value of a number.

9 Which network topology needs a central controller 1

10 Which out of the following does not come under Cyber Crime? 1

a Copying data from the social networking account of a person without his/her
information & consent.
b Stealing a brand new computer from showroom
c Viewing & transferring funds digitally from a person’s bank account without
his/her knowledge.
d Intentionally making a false account on the name of a celebrity on a social
networking site.

11 The pattern ‘_ _ _’ matches any string of -------------------three characters 1


and ‘_ _ _%’ matches any string of -----------------------three characters

a) At least , Exactly b) Exactly, At least c) Atleast, All


d) All, Exactly

12 The Number of attributes in a relation is called its ------------------ 1

13 Name the transmission media best suitable for connecting hilly areas. 1

14 SQL applies conditions on groups through ----------- clause after groups 1


have been formed
a) group by b) where c)like d) having

15 --------------------is a type of wired transmission media in which data is 1


transmitted in the form of light

16 What will be the output of the following code? 1


2
select round(23.456, 2)
select truncate (34. 9385, 0)

17 A list is given as 1
AL= [1,2,3,4,5]
which of the following statement(s) will remove middle element 3 from it so
that the list becomes [1,2,4,5]
a) del AL[2] b) AL[2:2]=[ ] c) a.remove(3) d) a.pop(3)

18 In SQL, which command will you use to list all the tables created inside a 1
database ?

19 Assume that 50 employees are working in an organization. Each employee 1


has been allotted a separate workstation to work. In this way, all computers
are connected through the server and all these workstations are distributed
over two floors. In each floor, all the computers are connected to a switch.
Identify the type of network?

20 The unique address assigned to each NIC by the manufacturer is called 1


----------------------

21 Which of the following types of table constraints will prevent the entry of 1
duplicate rows?
a) Unique
b) Distinct
c) NOT NULL
d) NULL

Section-II
Both the Case study based questions are compulsory. Attempt any 4
sub parts from each question. Each question carries 1 mark
22 a Write SQL query to create a table “Job” with the following structure: 1

b Which command will you use to remove a table, including the structure from 1
the database?

c Classify the following commands according to their type :(DDL/DML) 1


i. INSERT INTO ii. ALTER TABLE

d Which is the correct query to delete all values from job table 1
3
i) Delete * from Job
ii) Delete from Job
iii) Delete table Job
iv) Drop table Job

e How will you add a new column J_rate of integer type in Job table 1

23 The following Python script exports the data of all football players from a file
"players.csv" to a new file "football.csv". Assume that the "players.csv" file
stores data of hundreds of players in tabular form under the following heads:
[SNo, Player_name, gender, game, category]

import -----------------------------------//statement1
f1=open("players.csv", "r")
ro=-------------------------------------//statement 2
f2=open("football.csv", "w", newline=")
wo=---------------------------------- // statement3
wo.writerow(["SNo","Player_name","gender","game","category"])
for row in ro:
if(row[3].lower()=="football"):
---------------------------- // statement 4
f1.close()
f2.close()
a Name the module that has to be imported in statement1. 1

b Complete statement2 to create a reader object for players.csv 1

c Complete statement 3 to create a writer object for football.csv 1

d Complete statement 4 which is to copy the record from players.csv to 1


football.csv

e Write full form of CSV 1

Part B
Section 1
24 Find output of the following expressions 2
i) (5<10) and (10<5) or (3<18 ) and not 8<18
ii) 2**(2* (len(‘01’)))

25 What is a protocol? Which protocol is used to copy a from/to a remotely 2


located computer?
OR

A teacher provides http://www.ncsnavy.in/home.aspx to Ram to identify the


URL and domain name. Help him for the same

26 Expand the following terms: 2


i) CDMA ii) SMTP iii) URL iv)GSM
4
27 Differentiate between actual parameter(s) and a formal parameter(s) with a 2
suitable example for each.
OR
Explain the use of global key word used in a function with the help of a
suitable example.

28 Find output of the following code 2

29 What are the possible output(s) from the following code? Also specify 2
maximum and minimum value that can be assigned to NUMBER

i) ES#NE#IO# ii) LE#NO#ON iii) NS#IE#LO# iv)EC#NB#IS#

30 Rewrite the following code in python after removing all syntax error(s). 2
Underline each correction done in the code.

5
31 Differentiate between fetchmany() and fetchone() functions with an 2
example

32 Explain why the following queries give different outputs on execution: 2


i. SELECT COUNT(ENAME) FROM EMP;
Output:
5

ii. SELECT Count(*) FROM EMP;


Output:
8

33 Differentiate between char(n) and varchar (n) data types 2

Section II

34 Write a function change_list(Arr) in Python, which accepts a list Arr of 3


numbers and converts all odd position values to zero and returns the new
list
Sample Input Data of the list
Arr= [ 10,20,30,40,12,11],

Output
Arr= [0, 20, 0, 40, 0, 11]

35 A text file friends.txt contains a poem. Write a function display_oddLines() to 3


display odd number lines from the text file.

If the friends.txt contains the following data

Friends are crazy, Friends are naughty !


Friends are honest, Friends are best !
Friends are like keygen, friends are like license key !
We are nothing without friends, Life is not possible without friends !

The output will be


Friends are crazy, Friends are naughty !
Friends are like keygen, friends are like license key !
OR
Write a function rev_text() which will read a text file data.txt and display
each word in reverse order.

For example if the data.txt contains

Friends are crazy, Friends are naughty !


Friends are honest, Friends are best !
The output will be
sdneirF era ,yzarc sdneirF era !ythguan
sdneirF era ,tsenoh sdneirF era !tseb
6
36 Consider the tables given below and write the output of the following 3
queries

i SELECT Tname, source, Destination from Train T, Reservation R


where T.TrainId=R.TrainId AND Source LIKE “%Delhi” OR Destination
LIKE “%Delhi”;

ii SELECT Max(JourneyDate),Min(JourneyDate) FROM Reservation;

iii select Tname, Source from from Train group by Source having count(*)>1;

37 Every record of a stack contains the information book_id and book_name 3


Write a function PUSH(stack ) to push a record to the stack

OR

Write a function POP(stack) to delete a record from the above mentioned


stack. Display the information (book_id and book_name ) of the deleted
record.

Section III

38 Rehaana Medicos Center has set up its new centre in Dubai. It has 5
four buildings as shown in the diagram given below:

7
Distance between the buildings are

Number of Computers

i Suggest a cable layout of connections between the buildings.

ii Suggest the most suitable place (i.e. buildings) to house the server of this
organization with reason

iii Suggest the placement of the following device with justification:


a) Repeater b) Hub/Switch

iv Suggest a system (hardware/software) to prevent unauthorized access to or


from the network.

8
v Daniel has to share the data among various computers within accounts
department. Name the network (out of LAN, WAN, PAN and MAN) which is
being formed in this process.

39 Write the SQL query for questions from (i) to (v) 5

i To display all names from ACCOUNT where the ANAME contains the letter
‘h’ .

ii To display the ANO and AMOUNT of all Deposits and Withdrawals done in
the month of October 2017 from table TRANSACT.

iii To display the last date of transaction (DOT) from the table TRANSACT for
the Accounts having ANO as 103.

iv To display all ANO, ANAME and DOT of those persons from tables
ACCOUNT and TRANSACT who have transaction amount less than or
equal to 3000.

v Display ANO, TYPE and NET AMOUNT from TRANSACT where net
amount is calculated as AMOUNT+(AMOUNT*5)/100

9
40 A binary file EMP.dat has the structure (empid, empname, salary, gender) 5
i) Write a function DISPLAY() to read and display the contents of EMP file
ii) Write a function TRANSFER () to transfer all the records from “EMP.dat”
to “EMP1.dat” , where gender is M.

OR

A binary file STUDENT.DAT has the structure (sid, name, mark)

i) Write a function SEARCH(id) to search and display the details of a


particular student whose id is passed as parameter to the function.
ii ) Write a function DISPLAY () to count and display total number of
students getting mark > 90
*********************************************************

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy