You are on page 1of 8

KENDRIYA VIDYALAYA SANGATHAN, LUCKNOW REGION

SESSION ENDING EXAMINATION 2018-19


MARKING SCHEME-COMPUTER SCIENCE (083)
Class XI
Time: 3hrs M.M: 70

General Instructions:
 The answers given in the marking scheme are SUGGESTIVE, Examiners are requested to award marks for
all alternative correct Solutions/Answers conveying the similar meaning.
 In Python, ignore case sensitivity for identifiers (Variable / Functions/Keywords).
 In Python indentation is mandatory, however, number of spaces used forindenting may vary.
 In SQL related questions – both ways of text/character entries should beacceptable
for Example: “AMAR” and ‘amar’ both are acceptable.
 In SQL related questions – all date entries should be acceptable for Example:YYYY‐MM‐DD’,
‘YY‐MM‐DD’, ‘DD‐Mon‐YY’, “DD/MM/YY”, ‘DD/MM/YY’,“MM/DD/YY”,
‘MM/DD/YY’ and {MM/DD/YY} are correct.
 In SQL related questions – semicolon should be ignored for terminating the SQLstatements
 In SQL related questions, ignore case sensitivity.
 Accept the codes written in Python 2.X or 3.X, ignore the variations due to the versions or different
distributions of Python.
 Adopt step-wise marking.

1 a. What is Python IDLE? 1

Answer
IDLE is Python's Integrated Development and LearningEnvironment.
(1 Mark for correct Answer)

b. Identify the keywords and valid identifiers from the following. 2


(i) None (ii) Final (iii) 23Book (iv) _number v) break

Answer
Keywords : None, break
Valid Identifiers : Final, _number
( ½ Marks for each correct answer option)
c. Observe the following Python code and write the output of statement (i) and (ii) if the 2
value entered for p2 is ‘abc’

>>> p1 = ‘abc’
>>> p2 = input(“Enter a String”)

(i) >>> p1==p2

(ii) >>> p1 is p2
Answer

---1---
(i) True (1 Marks for correct answer )
(ii) False (1 Marks for correct answer )
d. What will be output of following: 2
>>> a, b, c = 15.9 , 3 , 20 Answer
>>> print(a/b) 5.3
>>> print(a//b) 5.0
>>> print(c% b) 2
>>> print(b**2) 9
( ½ Marks for each correct answer ,
Total ½ x 4 = 2 )
e Write a Python code to input a number and display the message after checking the 2
conditions as follows:-

Condition to be checked Message


If input is negative “Number is negative”
If input is zero “Number is zero”
If input is positive “Number is positive”

Answer
x=int(input("Input any number ")) ½ Marks
if x < 0:
print("Number is negative") ½ Marks
elif x==0:
print("Number is zero") ½ Marks
else:
print("Number is positive") ½ Marks

OR(2 Marks for correct coding )


f What will be the output of following Python code:

(i) for x in range(0,10,2): 2


print(x,"#", end=' ')

(ii) >>>X="GoodWork" 1
>>>tuple(X)
Answer
Output is:
('G', 'o', 'o', 'd', 'W', 'o', 'r', 'k')( 1 Marks for correct output
Deduct ½ marks if ( ) tuple braces are not used)
2.a Write a Python script to print Fibonacci series’ first 20 elements. Some initial elements 3
of a Fibonacci series are: 0, 1, 1, 2, 3, 5, 8, 13 , . . .

Answer
a,b=0,1 ½ Marks
print(a,b,end=' ') ½ Marks
for x in range(3,21): 1 Marks
c=a+b
print(c,end=' ')
a,b=b,c 1 Marks
---2---
ORFull 3 Marks of alternative correct coding

b. Write the output of following code: - 2

>>> St = “HellOWorld”
>>> print(St*:2+, St*: ─2+ )
>>> print( St*3 : ─ 4+
Answer
He HellOWor
lOW(1 Marks for each correct line)
c. Differentiate between syntax error and logical error in a program. Also give suitable 2
example for each type of error.
Answer
An error in program resulting from code that does not conform to the syntax
of the programming language is called Syntax Error. It is detected by the language
compiler / interpreter.
Example:-
a=0
while a < 10 # : not used, a syntax error
a=a+1

Logical Error is an error in a program's source code that results in incorrect or


unexpectedresult.Logical error might only be noticed duringruntime and harder to find
and debug.
Example:-
a=0
while a > 10 : # Logical error, loop will not execute , as a is 0
a=a+1

( ½ + ½ Marks for each correct difference (any one) between syntax error and logical
error. ½ + ½ Marks for each correct example )
d. Distinguish between LIST and TUPLE in Python? Also give suitable example. 2

Answer
Lists: List is a sequence of values of any type. Values in the list are calledelements /
items. These are mutable and indexed/ordered. List is enclosed insquare brackets.
Example: Lst = * 1,2,3,’a’,’b’,’p’ +

Tuples: Tuples are a sequence of values of any type, and are indexed byintegers. They
are immutable. Tuples are enclosed in ().
Example: T = ( 1,2,3,’a’,’b’,’p’ )

( ½ + ½ Marks for each correct difference (any one) between syntax error and logical
error. ½ + ½ Marks for each correct example )
e. Write a Python Code to search an element in the given list without using built-in 3
function for searching.
Answer

---3---
DATA_LIST=[23,14,17,34,56,11,19,21] ½ Marks
ELEM = int(input("Enter value of element to search in the list ")) ½ Marks
flag=0

for ctr in range(len(DATA_LIST)): ½ Marks


if DATA_LIST[ctr]==ELEM: 1 Marks
print('Element found at',ctr+1,' position')
flag=1
break
if flag==0:
print('Search not successful----Element not found') ½ Marks

(OR Full 3 Marks for any correct alternative solution.)

f. Write the most appropriate list method to perform the following task. 2
(i) Add an element at the end of the list
(ii) Update an element at the beginning of the list.

Answer
L = [1,11,15,16]
(i) L.append(item) 1 marks for correct syntax or example
(ii) L[index]= <new_value> 1 marks for correct syntax or example

3a. What will be the output of following:- 1


>>> M = (10,20,30,40)
>>> type(M)
Answer
<class 'tuple'> OR Tuple (1 Marks for correct output)
b. What is dictionary in Python? Also give an example of dictionary that is having 3 2
elements.
Answer
Dictionariesis a mapping between a set of indices (which are calledkeys) and a set of
values. Each key maps a value. The association of a key and a value iscalled a key-value
pair.
Example: d = {1:'appke',2:'black',3:'cake'}

(1 mark for correct definition + 1 Marks for any correct example )

c Write the output for the following Python codes. 2


A={1:100, 2:200, 3:300, 4:400, 5:500 }
print(A.items( ))
print(A.keys( ))
print(A.values( ))

Answer
[(1, 100), (2, 200), (3, 300), (4, 400), (5, 500)] 1 Marks
[1, 2, 3, 4, 5] ½ Marks
[100, 200, 300, 400, 500] ½ Marks

---4---
d Write Python Code for arranging the unsorted list elements in ascending order by using 4
Bubble sorting technique.
For example the list is :
DATA_LIST= [12, 7, 19, 2, 14, 3, 9]
Answer
DATA_LIST=[23,14,17,34,56,11,19,21]
print('Unsorted list : ',DATA_LIST)

for i in range(len(DATA_LIST)):
for j in range(len(DATA_LIST)-i-1):
if DATA_LIST[j] > DATA_LIST[j+1]:
DATA_LIST[j+1], DATA_LIST[j] = DATA_LIST[j],DATA_LIST[j+1]
print('Sorted List: ',DATA_LIST)

(Correct first for loop ½ marks, Correct second for loop ½ marks , Correct if statement
1 marks, swapping 1 Marks )
4a. Name any two operating systems used in Mobiles? 1

( ½ marks for each correct Mobile OS, OR 1 for correct 2 Mobile OS)
b. Write any two differences between RAM and ROM? 2
( 2 marks for any two correct differences )
c. Name two types of Language processors. 1
Answer
Assemble, Compiler and Interpreter ( 1 Marks for correct answer)
d. Expand the following: 1
a) EEPROM b)USB
Answer
a. Electrically Erasable Programmable Read Only Memory ½ Marks
b. Universal Serial Bus ½ Marks
e. Convert ( 43 )10to binary equivalent. 1
Answer (101011 )2
(1 Marks for correct answer, ½ marks for only correct steps)
f. Name any two Unicode encoding schemes. 1
Answer : UTF-8, UTF 16, UTF 32 ( 1 for any two correct answer, ½ for each)
g. Arrange the following in ascending order of memory capacity: 1
Terabyte , Byte,Kilobyte, Nibble, Megabyte, Gigabyte

Answer : Nibble < Byte < Kilobyte < Megabyte < Gigabyte < Terabyte
h. Draw the diagram of digital circuit for A .( B + C ) 2

(1 marks for correct symbols, full marks for correct circuit )

---5---
5 a. What will be the degree and cardinality of following relation ITEM? 2
ITEM
ItemCode ItemName Price
AB1 Milk 48.00
AB2 Bread 25.00
AB3 Cream 47.00
AB4 Cake 120.00
Answer : Degree 3 , Cardinality : 4
( 2 marks for correct answer / 1 for each correct answer)
b. Define the term Primary Key and Candidate Key in context of Relational Database. 2
Answer:
( 2 marks for correct answer / 1 for each correct definition or example)
c. Expand the terms : 1
a) DML b) SQL
Answer:
DML : Data Manipulation Language ½ Marks
SQL : Structured Query Language ½ Marks
6a Observe the following tables Watches and Sales and write SQL commands for the 4
queries (i) to (iv)

i. To display all the details of those watches whose name ends with‘Time’
ii To display watch’s name and price of those watches which have pricerange in between
5000-15000.
iii To display total quantity in store of Unisex type watches.

---6---
iv To display watch name and their quantity sold in first quarter.

Answer
i. SELECT * FROM watches WHERE watch_name LIKE ‘%Time’

(½ mark for SELECT query)(½ mark for where clause)

ii. SELECT watch_name, price FROM watches WHERE price between 5000and 15000;

(½ mark for SELECT query)(½ mark for where clause)

iii. SELECT SUM(qty_store) FROM watches WHERE type like ’Unisex’;

(½ mark for SELECT query)(½ mark for where clause)

iv. SELECT watch_name,qty_sold FROM watches w,sale s


WHEREw.watchid=s.watchidAND quarter=1;

(½ mark for SELECT query)(½ mark for where clause)


6b What is NoSQL Database? Name any free and open source NoSQL database. 2
Answer
NoSQL database are primarily called as non-relational or distributeddatabase. SQL
databases have predefined schemawhereas NoSQL databases have dynamic schema
for unstructured data. Example: MongoDB

(1 Marks for correct definition + 1 Marks for correct example.)


6 c. Write SQL command to create a relation as per given specification : 2

Name of Relation : STUDENTS


Primary Key : StdID
Field Name Data Type and Size
StdID Integer
SName VARCHAR (30)
Stream VARCHAR (30)
Gender CHAR(1)
Fees DECIMAL(6,2)

(1 Mark for correct CREATE TABLE command and 1 mark for PRIMARY KEY constraint )
d. Write SQL command to fetch the given record into above relation STUDENTS 1
The record of Jayashree is :

StdID SName Stream Gender Fees


101 Jayashree Science F 1200.00

( ½ Mark for correct INSERT INTO + ½ Marks for using VALUE command correctly)
e. Write SQL statement to add one column SEC of CHAR type of size 1 in the above 1
relation STUDENT .
(1 Marks for ALTER TABLE Students ADD SECCHAR(1) )

---7---
7. a. Mr. Rohan wants to prevent unauthorized access to/from his company's local area 1
network. Write the name of the system, which he should install to do the same.
Answer : Firewall ( 1 Mark for correct answer)
b. Explain the following terms: (a) Malware b) Trojans 2
Answer:
Malware:-software that is specifically designed to disrupt, damage, or gain unauthorized
access to a computer system.

Trojans: A Trojan horse or Trojan is a type of malware that is often disguised as


legitimate software. Trojans can be employed by cyber-thieves and hackers trying to
gain access to users' systems. Users are typically tricked by some form of social
engineering into loading and executing Trojans on their systems. ( 1 Marks correct
definition of Cookie, 1 Marks for correct definition of Spam)
c. Name the crime in which a computer and internet is used in an illegitimate way to harm 1
the user.

Answer : Cyber Crime ( 1 Marks for correct answer.)


d Why cyber security should be taken care by the user while working on internet? 2

(2 marks for correct answer, 1 marks for each point)

e 1
Exploring appropriate and ethical behaviours related to online environments and digital
media is called __________________. (Select the best option)

(a) Cyber ethics (b) Cyber safety


(c) Cyber security (d) Cyber law

Answer : Cyber ethics (1 mark for correct answer)


f. What are the advantages of https over http? 2
Answer
 HTTPS stands for Hypertext transfer protocol secure and http stands for hypertext
transfer protocol.
 The advantage of https over http is a web site is secure if its name has the prefix
https.
 The prefix indicates that the Web site implements the Secure Sockets Layer (SSL)
protocol.
 SSL is an Internet security protocol that ensures secure data communication by
encrypting the information transmitted.
 The SSL protocol certifies that the Web site is genuine and ensures that the data you
provide to the site is not misused.

(2 marks for any two correct points, 1 mark for each )


g. Facebook, twitter or any other 1
(½ for each)

---8---

You might also like