KENDRIYA VIDYALAYA SANGATHAN, AHMEDABAD REGION …

嚜熾ENDRIYA VIDYALAYA SANGATHAN, AHMEDABAD REGION

FIRST PRE-BOARD EXAMINATION, 2020

SUBJECT : COMPUTER SCIENCE (NEW) 每 083

M.M : 70

CLASS : XII

TIME : 3 HOURS

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 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 sub-parts. An examinee

is to attempt any 4 out of the 5 subparts.

4. Part 每 B is Descriptive Paper.

5. Part 每 B has three sections

a. Section 每 I is short answer questions of 2 marks each in which two questions 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

Questi

Marks

on No.

Allocated

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

Which of the following is not a valid identifier name in Python? Justify reason

1

for it not being a valid name.

a) 5Total

2

b) _Radius

c) pie

d)While

Find the output -

1

>>>A = [17, 24, 15, 30]

>>>A.insert( 2, 33)

>>>print ( A [-4])

3

Name the Python Library modules which need to be imported to invoke the

1

following functions:

(i) ceil()

4

(ii) randrange()

Which of the following are valid operator in Python:

(i) */

(ii) is

(iii) ^

(iv)

1

like

Page 1 of 10

5

Which of the following statements will create a tuple ?

1

(a) Tp1 = (※a§, ※b§)

(b) Tp1= (3) * 3

(c) Tp1[2] = (※a§, ※b§)

(d) None of these

6

What will be the result of the following code?

1

>>>d1 = {※abc§ : 5, ※def§ : 6, ※ghi§ : 7}

>>>print (d1[0])

(a) abc

7

(b) 5

(c)

{※abc§:5}

(d) Error

Find the output of the following:

1

>>>S = 1, (2,3,4), 5, (6,7)

>>> len(S)

8

Which of the following are Keywords in Python ?

(i) break

9

(ii) check

(iii) range

1

(iv) while

__________ is a specific condition in a network when more data packets are

1

coming to network device than they can handle and process at a time.

10

Ravi received a mail from IRS department on clicking ※Click 每Here§, he was

1

taken to a site designed to imitate an official looking website, such as

. He uploaded some important information on it.

Identify and explain the cybercrime being discussed in the above scenario.

11

Which command is used to change the number of columns in a table?

1

12

Which keyword is used to select rows containing column that match a

1

wildcard pattern?

13

The name of the current working directory can be determined using ______

1

method.

14

Differentiate between Degree and Cardinality.

1

15

Give one example of each 每 Guided media and Unguided media

1

16

Which of the following statement create a dictionary?

1

a) d = { }

b) d = {※john§:40, ※peter§:45}

c) d = (40 : ※john§, 45 : ※peter§}

d) d = All of the mentioned above

Page 2 of 10

17

Find the output of the following:

1

>>>Name = ※Python Examination§

>>>print (Name [ : 8 : -1])

18

All aggregate functions except ___________ ignore null values in their input

1

collection.

a) Count (attribute)

b) Count (*)

c) Avg ()

d) Sum ()

19

Write the expand form of Wi-Max.

1

20

Group functions can be applied to any numeric values, some text types and

1

DATE values. (True/False)

21

_______________ is a network device that connects dissimilar networks.

1

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 department is considering to maintain their worker data using SQL to store

the data. As a database administer, Karan has decided that :

1*4=4

Name of the database - Department

Name of the table - WORKER

The attributes of WORKER are as follows:

WORKER_ID - character of size 3

FIRST_NAME 每 character of size 10

LAST_NAME每 character of size 10

SALARY - numeric

JOINING_DATE 每 Date

DEPARTMENT 每 character of size 10

WORKER_I

D

001

002

003

004

005

006

007

008

FIRST_NA

ME

Monika

Niharika

Vishal

Amitabh

Vivek

Vipul

Satish

Monika

LAST_NAM

E

Arora

Diwan

Singhal

Singh

Bhati

Diwan

Kumar

Chauhan

SALARY

100000

80000

300000

500000

500000

200000

75000

80000

JOINING_D

ATE

2014-02-20

2014-06-11

2014-02-20

2014-02-20

2014-06-11

2014-06-11

2014-02-20

2014-04-11

DEPARTM

ENT

HR

Admin

HR

Admin

Admin

Account

Account

Admin

a) Write a query to create the given table WORKER.

1

b) Identify the attribute best suitable to be declared as a primary key.

1

c) Karan wants to increase the size of the FIRST_NAME column from

1

10 to 20 characters. Write an appropriate query to change the size.

Page 3 of 10

d) Karan wants to remove all the data from table WORKER from the

database Department. Which command will he use from the

following:

i) DELETE FROM WORKER;

ii) DROP TABLE WORKER;

iii) DROP DATABASE Department;

iv) DELETE * FROM WORKER;

1

e) Write a query to display the Structure of the table WORKER, i.e. name

of the attribute and their respective data types.

23

Ashok Kumar of class 12 is writing a program to create a CSV file

1*4=4

※empdata.csv§ with empid, name and mobile no and search empid and

display the record. He has written the following code. As a programmer, help

him to successfully execute the given task.

import _____

#Line1

fields=['empid','name','mobile_no']

rows=[['101','Rohit','8982345659'],['102','Shaurya','8974564589'],

['103','Deep','8753695421'],['104','Prerna','9889984567'],

['105','Lakshya','7698459876']]

filename="empdata.csv"

with open(filename,'w',newline='') as f:

csv_w=csv.writer(f,delimiter=',')

csv_w.___________

#Line2

csv_w.___________

#Line3

with open(filename,'r') as f:

csv_r=______________(f,delimiter=',')

#Line4

ans='y'

while ans=='y':

found=False

emplid=(input("Enter employee id to search="))

for row in csv_r:

if len(row)!=0:

if _____==emplid:

#Line5

print("Name : ",row[1])

print("Mobile No : ",row[2])

found=True

Page 4 of 10

break

if not found:

print("Employee id not found")

ans=input("Do you want to search more? (y)")

(a) Name the module he should import in Line 1.

1

(b) Write a code to write the fields (column heading) once from fields list 1

in Line2.

(c) Write a code to write the rows all at once from rows list in Line3.

1

(d) Fill in the blank in Line4 to read the data from a csv file.

1

(e) Fill in the blank to match the employee id entered by the user with the

1

empid of record from a file in Line5.

PART 每 B

Section 每 I

24

Evaluate the following expressions:

2

a) 12*(3%4)//2+6

b) not 12 > 6 and 7 < 17 or not 12 < 4

25

Define and explain all parts of a URL of a website. i.e.

2

. It has various parts.

OR

Define cookies and hacking.

26

Expand the following terms:

a) IPR

27

b) SIM

2

c) IMAP

d)HTTP

What is the difference between a Local Scope and Global Scope ? Also, give

2

a suitable Python code to illustrate both.

OR

Define different types of formal arguments in Python, with example.

28

Observe the following Python code very carefully and rewrite it after

2

removing all syntactical errors with each correction underlined.

DEF result_even( ):

x = input(※Enter a number§)

if (x % 2 = 0) :

print (※You entered an even number§)

Page 5 of 10

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download