KENDRIYA VIDYALAYA SANGATHAN, AHMEDABAD REGION …
KENDRIYA 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.
Questi on No.
1 2
3 4
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.
Which of the following is not a valid identifier name in Python? Justify reason
for it not being a valid name.
a) 5Total
b) _Radius
c) pie
d)While
Find the output -
>>>A = [17, 24, 15, 30]
>>>A.insert( 2, 33)
>>>print ( A [-4])
Name the Python Library modules which need to be imported to invoke the
following functions:
(i) ceil()
(ii) randrange()
Which of the following are valid operator in Python:
(i) */
(ii) is
(iii) ^
(iv) like
Marks Allocated
1 1
1 1
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 (b) 5 (c) {"abc":5} (d) Error
7
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 ?
1
(i) break (ii) check (iii) range (iv) while
9
__________ 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 1*4=4
the data. As a database administer, Karan has decided that :
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 FIRST_NA LAST_NAM SALARY
JOINING_D DEPARTM
D
ME
E
ATE
ENT
001
Monika
Arora
100000
2014-02-20 HR
002
Niharika
Diwan
80000
2014-06-11 Admin
003
Vishal
Singhal
300000
2014-02-20 HR
004
Amitabh
Singh
500000
2014-02-20 Admin
005
Vivek
Bhati
500000
2014-06-11 Admin
006
Vipul
Diwan
200000
2014-06-11 Account
007
Satish
Kumar
75000
2014-02-20 Account
008
Monika
Chauhan 80000
2014-04-11 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 1 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;
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:
2
a) IPR
b) SIM c) IMAP d)HTTP
27
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.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.