Sample Pper Ak 2024
Sample Pper Ak 2024
COMPUTER SCIECNE
SUBJECT CODE:083
10 SAMPLE PAPERS
&
MARKING SCHEME
Page: 1/11
14. (A) Details of all products whose names start with 'App'
(1)
(1 mark for correct answer)
15. (D) CHAR
(1)
(1 mark for correct answer)
16. (B) count()
(1)
(1 mark for correct answer)
17. (B) FTP
(1)
(1 mark for correct answer)
18. (B) Gateway
(1)
(1 mark for correct answer)
19. (B) Packet Switching
(1)
(1 mark for correct answer)
20. (C) A is True but R is False.
(1)
(1 mark for correct answer)
21. (C) A is True but R is False.
(1)
(1 mark for correct answer)
Page: 2/11
(II)
A) L1.extend(L2)
OR
B) L2.reverse()
(1 mark for correct answer)
25. (A), (C)
(½ x 2 = 1 Mark)
(2)
Minimum and maximum possible values of the variable b: 1,6
(½ x 2 = 1 Mark)
26. def swap_first_last(tup):
if len(tup) < 2:
return tup
new_tup = (tup[-1],) + tup[1:-1] + (tup[0],)
return new_tup
(2)
OR
Page: 3/11
B) SMTP: Simple Mail Transfer Protocol.
def show():
f=open("Email.txt",'r')
data=f.read()
words=data.split()
for word in words:
if '@cmail' in word:
print(word,end=' ')
f.close()
(½ mark for correct function header)
(½ mark for correctly opening the file)
(½ mark for correctly reading from the file)
(½ mark for splitting the text into words)
(1 mark for correctly displaying the desired words) (3)
OR
(B)
def display_long_words():
with open("Words.txt", 'r') as file:
data=file.read()
words=data.split()
for word in words:
if len(word)>5:
print(word,end=' ')
(½ mark for correct function header)
(½ mark for correctly opening the file)
(½ mark for correctly reading from the file)
( ½ mark for splitting the text into words)
(1 mark for correctly displaying the desired words)
Page: 4/11
30. (A)
(I)
def push_book(BooksStack, new_book):
BooksStack.append(new_book)
(II)
def pop_book(BooksStack):
if not BooksStack:
print("Underflow")
else:
return(BookStack.pop())
(III)
def peep(BooksStack):
if not BooksStack:
print("None")
else:
print(BookStack[-1])
(3x1 mark for correct function body; No marks for any function header as it
was a part of the question)
OR
(B)
def push_even(N):
(3)
EvenNumbers = []
for num in N:
if num % 2 == 0:
EvenNumbers.append(num)
return EvenNumbers
VALUES = []
for i in range(5):
VALUES.append(int(input("Enter an integer: ")))
EvenNumbers = push_even(VALUES)
def pop_even():
if not EvenNumbers:
print("Underflow")
else:
print(EvenNumbers.pop())
pop_even()
Page: 5/11
def Disp_even():
if not EvenNumbers:
print("None")
else:
print(EvenNumbers[-1])
Disp_even()
(1/2 for identifying even numbers)
(1/2 mark for correctly adding data to stack)
(1/2 mark for correctly poping data on the stack and 1/2 mark for checking
condition)
(1/2 mark for correctly displaying the data with none)
(1/2 mark for function call statements)
31. (A) 15@
7@
9
OR
(3)
(B) 1 #2 #3#
1 #2 #3 #
1#
C_Name | Total_Quantity
--------- |---------------
Jitendra |1
Mustafa |2
Dhwani |1
Page: 6/11
(II)
(IV)
MAX(Price)
-----------
12000
(II)
def Count_records():
import csv
f=open("happiness.csv",'r')
records=csv.reader(f)
next(records, None) #To skip the Header row
count=0
for i in records:
count+=1
print(count)
f.close()
Page: 7/11
(½ mark for opening in the file in right mode)
(½ mark for correctly creating the reader object)
(½ mark for correct use of counter)
(½ mark for correctly displaying the counter)
Note (for both parts (I) and (II)):
(i) Ignore import csv as it may be considered the part of the
complete program, and there is no need to import it in individual
functions.
(ii) Ignore next(records, None) as the file may or may not have the
Header Row.
34. (I) Select * from FACULTY natural join COURSES where Salary<12000;
Or
Select * from FACULTY, COURSES where Salary<12000 and
facuty.f_id=courses.f_id;
(II) Select * from courses where fees between 20000 and 50000;
(III) Update courses set fees=fees+500 where CName like
'%Computer%';
(IV)
(A) Select FName, LName from faculty natural join courses where
Came="System Design"; (4)
Or
Select FName, LName from faculty, courses where Came="System
Design" and facuty.f_id=courses.f_id;
OR
Page: 8/11
(½ mark for correctly importing the connector object)
(½ mark for correctly creating the connection object)
(½ mark for correctly creating the cursor object)
(½ mark for correctly inputting the data)
(½ mark for correct creation of first query)
(½ mark for correctly executing the first query with commit)
(½ mark for correctly executing the second query)
(½ mark for correctly displaying the data)
def input_candidates():
candidates = []
n = int(input("Enter the number of candidates you want to add: "))
for i in range(n):
candidate_id = int(input("Enter Candidate ID: "))
candidate_name = input("Enter Candidate Name: ")
designation = input("Enter Designation: ")
experience = float(input("Enter Experience (in years): "))
candidates.append([candidate_id, candidate_name, designation,
experience])
return candidates
candidates_list = input_candidates()
def append_candidate_data(candidates):
with open('candidates.bin', 'ab') as file:
for candidate in candidates:
pickle.dump(candidate, file)
print("Candidate data appended successfully.")
append_candidate_data(candidates_list)
(II)
import pickle
def update_senior_manager():
updated_candidates = []
try:
with open('candidates.bin', 'rb') as file:
while True:
try:
candidate = pickle.load(file)
if candidate[3] > 10: # If experience > 10 years
candidate[2] = 'Senior Manager'
updated_candidates.append(candidate)
except EOFError:
Page: 9/11
break # End of file reached
except FileNotFoundError:
print("No candidate data found. Please add candidates first.")
return
(III)
import pickle
def display_non_senior_managers():
try:
with open('candidates.bin', 'rb') as file:
while True:
try:
candidate = pickle.load(file)
if candidate[2] != 'Senior Manager': # Check if not Senior
Manager
print(f"Candidate ID: {candidate[0]}")
print(f"Candidate Name: {candidate[1]}")
print(f"Designation: {candidate[2]}")
print(f"Experience: {candidate[3]}")
print("--------------------")
except EOFError:
break # End of file reached
except FileNotFoundError:
print("No candidate data found. Please add candidates first.")
display_non_senior_managers()
(II) Switch
(1 mark for correct answer)
(III)
Page: 10/11
(or Any other correct layout)
Cable: Coaxial cable
(½ mark for correct layout + ½ mark for correct table type)
(IV) There is no requirement of the Repeat as the optical fibre cable used for
the network can carry the data to much longer distances than within the
campus.
(1 mark for correct answer)
Page: 11/11
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Marking Scheme
Strictly Confidential
(For Internal and Restricted use only)
Senior School Certificate Examination, 2023
SUBJECT NAME: COMPUTER SCIENCE (SUBJECT CODE: 083) (PAPER CODE: 91)
General Instructions:
1 You are aware that evaluation is the most important process in the actual and correct assessment
of the candidates. A small mistake in evaluation may lead to serious problems which may affect
the future of the candidates, education system and teaching profession. To avoid mistakes, it is
requested that before starting evaluation, you must read and understand the spot evaluation
guidelines carefully.
3 Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be
done according to one’s own interpretation or any other consideration. Marking Scheme should
be strictly adhered to and religiously followed. However, while evaluating, answers which are
based on latest information or knowledge and/or are innovative, they may be assessed for
their correctness otherwise and due marks be awarded to them. In class-X, while
evaluating two competency-based questions, please try to understand given answer and
even if reply is not from marking scheme but correct competency is enumerated by the
candidate, due marks should be awarded.
4 The Marking scheme carries only suggested value points for the answers. These are in the nature
of Guidelines only and do not constitute the complete answer. The students can have their own
expression and if the expression is correct, the due marks should be awarded accordingly.
5 The Head-Examiner must go through the first five answer books evaluated by each evaluator on
the first day, to ensure that evaluation has been carried out as per the instructions given in the
Marking Scheme. If there is any variation, the same should be zero after delibration and
discussion. The remaining answer books meant for evaluation shall be given only after ensuring
that there is no significant variation in the marking of individual evaluators.
6 Evaluators will mark( √ ) wherever answer is correct. For wrong answer CROSS ‘X” be marked.
Evaluators will not put right (✓)while evaluating which gives an impression that answer is correct
and no marks are awarded. This is most common mistake which evaluators are committing.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #1/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
7 If a question has parts, please award marks on the right-hand side for each part. Marks awarded
for different parts of the question should then be totaled up and written in the left-hand margin
and encircled. This may be followed strictly.
8 If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly.
9 If a student has attempted an extra question, answer of the question deserving more marks
should be retained and the other answer scored out with a note “Extra Question”.
10 No marks to be deducted for the cumulative effect of an error. It should be penalized only once.
12 Every examiner has to necessarily do evaluation work for full working hours i.e., 8 hours every
day and evaluate 20 answer books per day in main subjects and 25 answer books per day in
other subjects (Details are given in Spot Guidelines).This is in view of the reduced syllabus and
number of questions in question paper.
13 Ensure that you do not make the following common types of errors committed by the Examiner
in the past:-
● Leaving answer or part thereof unassessed in an answer book.
● Giving more marks for an answer than assigned to it.
● Wrong totaling of marks awarded on an answer.
● Wrong transfer of marks from the inside pages of the answer book to the title
page.
● Wrong question wise totaling on the title page.
● Wrong totaling of marks of the two columns on the title page.
● Wrong grand total.
● Marks in words and figures not tallying/not same.
● Wrong transfer of marks from the answer book to online award list.
● Answers marked as correct, but marks not awarded. (Ensure that the right tick
mark is correctly and clearly indicated. It should merely be a line. Same is with the
X for incorrect answer.)
● Half or a part of answer marked correct and the rest as wrong, but no marks
awarded.
14 While evaluating the answer books if the answer is found to be totally incorrect, it should be
marked as cross (X) and awarded zero (0)Marks.
15 Any un assessed portion, non-carrying over of marks to the title page, or totaling error detected
by the candidate shall damage the prestige of all the personnel engaged in the evaluation work
as also of the Board. Hence, in order to uphold the prestige of all concerned, it is again reiterated
that the instructions be followed meticulously and judiciously.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #2/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
16 The Examiners should acquaint themselves with the guidelines given in the “Guidelines for spot
Evaluation” before starting the actual evaluation.
17 Every Examiner shall also ensure that all the answers are evaluated, marks carried over to the
title page, correctly totaled and written in figures and words.
18 The candidates are entitled to obtain a photocopy of the Answer Book on request on payment of
the prescribed processing fee. All Examiners/Additional Head Examiners/Head Examiners are
once again reminded that they must ensure that evaluation is carried out strictly as per value
points for each answer as given in the Marking Scheme.
General Instructions:
(i) This question paper contains five sections, Section A to E.
(ii) All questions are compulsory.
(iii) Section A have 18 questions carrying 1 mark each.
(iv) Section B has 7 Very Short Answer type questions carrying 2 marks each.
(v) Section C has 5 Short Answer type questions carrying 3 marks each.
(vi) Section D has 3 Long Answer type questions carrying 5 marks each.
(vii) Section E has 2 questions carrying 4 marks each. One internal choice is given in
Q.34 and 35, against Part (iii) only.
(viii) All programming questions are to be answered using Python Language only.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #3/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
SECTION - A
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #4/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Note:
an operator does not return any values until it is part of an expression
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #5/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
9. Which of the following statement(s) would give an error after executing the 1
following code ?
Stud={"Murugan" : 100, "Mithu" : 95} # Statement 1
print (Stud[95]) # Statement 2
Stud ["Murugan"]=99 # Statement 3
print(Stud.pop()) # Statement 4
print(Stud) # Statement 5
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #6/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
16. fetchall() method fetches all rows in a result set and returns a : 1
(a) Tuple of lists (b) List of tuples
(c) List of strings (d) Tuple of strings
Ans. (b) List of tuples
(1 mark for writing correct answer)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #7/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
SECTION B
19. Atharva is a Python programmer working on a program to find and return the 2
maximum value from the list. The code written below has syntactical errors.
Rewrite the correct code and underline the corrections made.
def max_num (L) :
max=L(0)
for a in L :
if a > max
max=a
return max
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #8/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
In case of wired transmission, the devices in the network are connected using
cables.
Wireless transmission uses waves/rays to connect devices.
OR
Any other valid difference (any one)
(2 marks for differentiating with or without examples)
OR
(1 mark each for defining each type with or without examples)
OR
(½ mark each for mentioning example of each type)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #9/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
(b) Differentiate between URL and domain name with the help of an
appropriate example.
Ans URL is the complete internet address of a webpage while Domain name is 2
just the name of the organisation/individual entity along with top-level
internet domains such as com, edu, gov, etc.
Example :
URL: https://www.ncert.nic.in/textbook/textbook.htm
Domain Name: ncert.nic.in OR www.ncert.nic.in
OR
any valid definition along with examples
(2 marks for writing any one difference with the help of examples)
OR
(2 marks for writing examples to differentiate correctly)
OR
(1 mark only for writing any one difference without examples)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #10/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #11/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Ans Output:
['CSCS','HINDIHINDI','PHYSICSPHYSICS','CHEMISTRYCHEMISTRY'
,'MATHSMATHS']
(2 Marks for writing the correct output with or without formatting)
OR
(b) Write the output of the code given below: 2
a =30
def call (x):
global a
if a%2==0:
x+=a
else:
x–=a
return x
x=20
print(call(35),end="#")
print(call(40),end= "@")
Ans. 65#70@
(½ marks each for the four components 65, #, 70, @ with or without
formatting)
25. (a) Differentiate between CHAR and VARCHAR data types in SQL with 2
appropriate example.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #12/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
CHAR data type is used to store strings of fixed length, while the VARCHAR
data type is used to store strings of variable-length. Eg, to store ‘India’,
VARCHAR(20) occupies only 5 bytes whereas CHAR(20) occupies 20 bytes.
OR
any other valid difference and examples
(2 Marks for mentioning one difference with the help of examples)
OR
(1 Mark each for writing explanation of each type with example)
OR
(½ Mark for each term for mentioning only purpose without example)
OR
(b) Name any two DDL and any two DML commands. 2
DDL – CREATE, ALTER, DROP (OR any two valid DDL command)
DML – INSERT, UPDATE, DELETE, SELECT ( OR any two valid DML command)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #13/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
SECTION-C
26 (a) Consider the following tables – LOAN and BORROWER: 1
Table : LOAN
Table : BORROWER
CUST_NAME LOAN_NO
JOHN L-171
KRISH L-230
RAVYA L-170
How many rows and columns will be there in the natural join of these two
tables ?
Ans. Rows : 2
Columns : 4
(½ Mark each for correct values of Rows and Columns)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #14/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
(b) Write the output of the queries (i) to (iv) based on the table, WORKER 2
given below:
TABLE: WORKER
W_ID F_NAME L_NAME CITY STATE
Ans.
F_NAME CITY
SAHIL KANPUR
VEDA KANPUR
MAHIR SONIPAT
MARY DELHI
ATHARVA DELHI
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #15/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Ans.
CITY
KANPUR
ROOP NAGAR
DELHI
SONIPAT
MAHIR HARYANA
ATHARVA DELHI
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #16/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Ans.
CITY COUNT (*)
KANPUR 2
ROOP NAGAR 1
DELHI 2
SONIPAT 1
27. (a) Write the definition of a Python function named LongLines( ) which 3
reads the contents of a text file named 'LINES.TXT' and displays those
lines from the file which have at least 10 words in it. For example, if the
content of 'LINES.TXT' is as follows :
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #17/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
def LongLines():
Ans. myfile=open('LINES.TXT') # ignore 'r' mode
all_lines=myfile.readlines()
for aline in all_lines:
if(len(aline.split()>=10):
print(aline)
myfile.close()
OR
def LongLines():
with open ('LINES.TXT') as myfile: # ignore 'r' mode
all_lines=myfile.readlines()
for aline in all_lines:
if(len(aline.split())>=10):
print(aline)
OR
def LongLines():
myfile=open('LINES.TXT') # ignore 'r' mode
for aline in myfile:
if(len(aline.split())>=10):
print(aline)
myfile.close()
OR
def LongLines():
myfile=open('LINES.TXT') # ignore 'r' mode
s1=" "
while s1:
s1=myfile.readline()
words=s1.split()
if(len(words)>=10):
print(s1)
myfile.close()
OR
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #18/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
(b) Write a function count_Dwords() in Python to count the words ending with a 3
digit in a text file "Details.txt".
Example:
If the file content is as follows:
On seat2 VIP1 will sit and
On seat1 VVIP2 will be sitting
Output will be:
Number of words ending with a digit are 4
OR
def count_Dwords():
count=0
myfile=open("Details.txt")
S=myfile.read()
Wlist=S.split()
for W in Wlist:
if i[-1] in "0123456789":
count=count+1
myfile.close()
print("Number of words ending with a digit are",count)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #19/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
def count_Dwords():
myfile=open("Details.txt")
count=0
for line in myfile:
s1=line.split()
for i in s1:
if i[-1] in "0123456789":
count=count+1
print("Number of words ending with a digit are",count)
myfile.close()
OR
28. (a) Write the outputs of the SQL queries (i) to (iv) based on the relations 2
COMPUTER and SALES given below :
Table : COMPUTER
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #20/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Table : SALES
PROD_ID QTY_SOLD QUARTER
P002 4 1
P003 2 2
P001 3 2
P004 2 1
200 4300
LOGITECH 2
CANON 2
MOUSE 3
KEYBOARD 2
JOYSTICK 2
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #21/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
MOUSE LOGITECH 2
KEYBOARD LOGITECH 2
JOYSTICK IBALL 1
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #22/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
def EOReplace():
L=[]
ch = 'y'
while ch == 'y' or ch == 'Y':
x = int(input('give item'))
L.append(x)
ch= input('do you want to enter more y/n ')
for i in range(len(L)):
if L[i]%2==0:
L[i]=L[i]+1
else:
L[i]=L[i]-1
print(L)
OR
def EOReplace():
L=eval(input("Enter list="))
Size=len(L)
for i in range(Size):
if L[i]%2==0:
L[i]=L[i]+1
else:
L[i]=L[i]-1
print(L)
OR
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #23/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
(ii) Pop_Cust() – To Pop the names of customers from the stack and
display them. Also, display “Underflow” when there are no customers in the
stack.
For example :
If the lists with customer details are as follows :
["Siddarth", "Delux"]
["Rahul", "Standard"]
["Jerry", "Delux"]
The stack should contain
Jerry
Siddharth
The output should be:
Jerry
Siddharth
Underflow
Ans. Hotel=[]
Customer=[["Siddarth","Delux"],["Rahul","Standard"],["Jer
ry","Delux"]]
def Push_Cust():
for rec in Customer:
if rec[1]=="Delux":
Hotel.append(rec[0])
def Pop_Cust():
while len(Hotel)>0:
print(Hotel.pop())
else:
print("Underflow")
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #24/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
top=0
def Push_Cust(Hotel,Customer):
global top
for cust_rec in Customer:
if cust_rec[1]=="Delux":
Hotel.insert(top, cust_rec[0])
top=top+1
def Pop_Cust(Hotel):
global top
while len(Hotel)>0:
print(Hotel.pop())
top=top-1
else:
print("Underflow")
OR
Any other valid Python code to serve the purpose.
(½ mark for defining correct function header (Push_Cust())
(½ mark for correct loop in function Push_Cust())
(½ mark for checking the condition and appending the data in
Push_Cust())
(½ mark for defining correct function header (Pop_Cust())
(½ mark for correct loop in function Pop_Cust())
(½ mark for deleting and displaying the data in Pop_Cust())
OR
(b) Write a function in Python, Push (Vehicle) where, Vehicle is a 3
dictionary containing details of vehicles – {Car_Name: Maker}.
The function should push the name of car manufactured by ‘TATA’
(including all the possible cases like Tata, TaTa, etc.) to the stack.
For example:
If the dictionary contains the following data :
Vehicle={"Santro":"Hyundai","Nexon":"TATA","Safari":"Tata"}
The stack should contain
Safari
Nexon
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #25/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Ans stack=[]
def Push(Vehicle) :
for v_name in Vehicle :
if Vehicle[v_name].upper()=="TATA" :
stack.append(v_name)
OR
stack=[]
def Push(Vehicle) :
for v_name in Vehicle :
if Vehicle[v_name] in ("TATA", "TaTa","tata","Tata"):
stack.append(v_name)
OR
Any other valid Python code to serve the purpose.
(½ mark for defining correct function header)
(½ mark for correct loop )
(1 mark for checking the condition )
(1 mark for appending the data)
SECTION - D
31 Quickdev, an IT based firm, located in Delhi is planning to set up a network
for its four branches within a city with its Marketing department in Kanpur.
As a network professional, give solutions to the questions (i) to (v), after
going through the branches locations and other details which are given below:
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #26/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
(i) Suggest the most suitable place to install the server for the Delhi branch 1
with a suitable reason.
Branch D, as it has maximum number of computers
Ans OR any other location with valid justification
(½ mark for naming the Branch and ½ mark for correct justification)
(ii) Suggest an ideal layout for connecting all these branches within Delhi. 1
Ans
(iii) Which device will you suggest, that should be placed in each of these 1
branches to efficiently connect all the computers within these branches ?
Ans. Switch/Hub/Router
(1 mark for suggesting the correct device)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #27/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
(iv) Delhi firm is planning to connect to its Marketing department in Kanpur which 1
is approximately 300 km away. Which type of network out of LAN, WAN or
MAN will be formed ? Justify your answer.
Ans. WAN – as the network is spread across different geographical locations of the
country.
(½ mark for writing the correct type of network)
(½ mark for correct justification)
(v) Suggest a protocol that shall be needed to provide help for transferring of 1
files between Delhi and Kanpur branch.
Ans. FTP
(1 mark for writing the correct answer as FTP)
OR
(1 mark for any other valid protocol that can be used to provide help
for transferring of files)
32 (a) What possible output(s) are expected to be displayed on screen at the time 2
of execution of the following program :
import random
M=[5,10,15,20,25,30]
for i in range(1,3):
first=random.randint(2,5)–1
sec=random.randint(3,6)–2
third=random.randint(1,4)
print(M[first], M[sec], M[third],sep="#")
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #28/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
(b) The code given below deletes the record from the table employee which 3
contains the following record structure:
E_code - String
E_name - String
Sal – Integer
City - String
Note the following to establish connectivity between Python and MySQL :
· Username is root
· Password is root
· The table exists in a MySQL database named emp.
· The details (E_code,E_name,Sal,City) are the attributes of the
table.
Write the following statements to complete the code :
Statement 1 – to import the desired library.
Statement 2 – to execute the command that deletes the record with
E_code as 'E101'.
Statement 3 – to delete the record permanently from the database.
mycursor=mydb.cursor()
_________________ # Statement 2
_________________ # Statement 3
print ("Record deleted")
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #29/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
(b) The code given below reads the following records from the table employee
and displays only those records who have employees coming from city
‘Delhi’:
E_code – String
E_name - String
Sal - Integer
City - String
Note the following to establish connectivity between Python and MySQL :
• Username is root
• Password is root
• The table exists in a MySQL database named emp.
• The details (E_code,E_name,Sal,City) are the attributes
of the table.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #30/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
Statement 1: mysql.connector
Ans. OR any other valid library used for
Python MySQL connectivity
Statement 2: mycursor.execute("select * from employee
where City='Delhi '")
Statement 3: mycursor.fetchall()
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #31/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
import csv
def COURIER_ADD() :
f1=open("courier.csv","a",newline="\n")
writ=csv.writer(f1)
cid=int(input("Enter the Courier id"))
s_name=input ("Enter the Sender Name")
Source=input("Enter the Source Address")
destination=input("Enter Destination Name")
detail=[cid,s_name,Source,destination]
writ.writerow (detail)
f1.close()
def COURIER_SEARCH() :
f1=open("courier.csv","r") # ignore newline
detail=csv.reader(f1)
name=input("Enter the Destination Name to be searched")
for i in detail :
if i[3]==name:
print("Details of courier are: ",i)
COURIER_ADD()
COURIER_SEARCH()
OR
Any other valid Python code to serve the purpose.
(1 mark for any one correct difference between CSV and Text file)
import csv
def Add_Book():
f1=open("Book.csv","a",newline="\n")
writ=csv.writer(f1)
book_ID=int(input("Enter the Book id"))
B_name=input("Enter the Book Name")
pub=input("Enter the Publisher Name")
detail=[book_ID, B_name,pub]
writ.writerow(detail)
f1.close()
Add_Book()
Search_Book()
OR
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #33/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
SECTION E
34 The school has asked their estate manager Mr. Rahul to maintain the data of
all the labs in a table LAB. Rahul has created a table and entered data of 5
labs.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #34/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
35 Shreyas is a programmer, who has recently been given a task to write a user
defined function named write_bin() to create a binary file called
Cust_file.dat containing customer information – customer number (c_no),
name (c_name), quantity (qty), price (price) and amount (amt) of each
customer.
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #35/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
import pickle
def write_bin():
bin_file=_______ #Statement 1
while True:
c_no=int(input("enter customer number"))
c_name=input("enter customer name")
qty=int(input("enter qty"))
price=int(input("enter price"))
if ________ #Statement 2
print("Quantity less than 10..Cannot SAVE")
else:
amt=price * qty
c_detail=[c_no,c_name,qty,price,amt]
________ #Statement 3
ans=input("Do you wish to enter more records y/n")
if ans.lower()=='n':
________ #Statement 4
_________________ #Statement 5
______________________ #Statement 6
(i) Write the correct statement to open a file 'Cust_file.dat' for writing the data 1
of the customer.
Ans Statement 1: open ("Cust_file.dat", "wb")
(1 Mark for correctly writing missing Statement 1)
(ii) Which statement should Shreyas fill in Statement 2 to check whether quantity 1
is less than 10.
Ans Statement 2: qty<10 :
(1 Mark for correctly writing missing Statement 2)
(iii) Which statement should Shreyas fill in Statement 3 to write data to the binary 2
file and in Statement 4 to stop further processing if the user does not wish to
enter more records.
Ans Statement 3: pickle.dump(c_detail,bin_file)
Statement 4: break
(1 Mark for correctly writing missing Statement 3)
(1 Mark for correctly writing missing Statement 4)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #36/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023
OR
(Option only for part (iii))
(iii) What should Shreyas fill in Statement 5 to close the binary file named 2
Cust_file.dat and in Statement 6 to call a function to write data in binary
file?
Ans Statement 5: bin_file.close()
Statement 6: write_bin()
(1 Mark for correctly writing missing Statement 5)
(1 Mark for correctly writing missing Statement 6)
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #37/37]
Strictly Confidential: (For Internal and Restricted use only)
Senior School Certificate Examination
September 2020
Marking Scheme – Computer Science (NEW) (SUBJECT CODE: 083)
(SERIES: HMJ/C, PAPER CODE – 91/C, SET 4)
General Instructions:
1. You are aware that evaluation is the most important process in the actual and correct assessment of
the candidates. A small mistake in evaluation may lead to serious problems which may affect the
future of the candidates, education system and the teaching profession. To avoid mistakes, it is
requested that before starting evaluation, you must read and understand the spot evaluation
guidelines carefully. Evaluation is a 10 -12 days mission for all of us. Hence, it is necessary that
you put in your best efforts in this process.
2. Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be done
according to one’s own interpretation or any other consideration. Marking Scheme should be strictly
adhered to and religiously followed. However, while evaluating, answers which are based on the
latest information or knowledge and/or are innovative, they may be assessed for their
correctness otherwise and marks be awarded to them.
3. The Head-Examiner must go through the first five answer books evaluated by each evaluator on the
first day, to ensure that evaluation has been carried out as per the instructions given in the Marking
Scheme. The remaining answer books meant for evaluation shall be given only after ensuring that
there is no significant variation in the marking of individual evaluators.
4. If a question has parts, please award marks on the right-hand side for each part. Marks awarded for
different parts of the question should then be totaled up and written in the left-hand margin and
encircled.
5. If a question does not have any parts, marks must be awarded in the left hand margin and encircled.
6. If a student has attempted an extra question, answer of the question deserving more marks should be
retained and the other answer scored out.
7. No marks to be deducted for the cumulative effect of an error. It should be penalized only once.
8. A full scale of marks 70 (example: 1-70) has to be used. Please do not hesitate to award full marks if
the answer deserves it.
9. Every examiner has to necessarily do evaluation work for full working hours i.e. 8 hours every day and
evaluate 25 answer books per day.
10. Ensure that you do not make the following common types of errors committed by the Examiner in the
past:-
a. Leaving the answer or part thereof unassessed in an answer book.
b. Giving more marks for an answer than assigned to it.
c. Wrong transfer of marks from the inside pages of the answer book to the title page.
d. Wrong question wise totaling on the title page.
e. Wrong totaling of marks of the two columns on the title page.
f. Wrong grand total.
g. Marks in words and figures not tallying.
h. Wrong transfer of marks from the answer book to online award list.
i. Answers marked as correct, but marks not awarded. (Ensure that the right tick mark is correctly
and clearly indicated. It should merely be a line. Same is with the X for incorrect answer.)
j. Half or a part of answer marked correct and the rest as wrong, but no marks awarded.
11. While evaluating the answer books if the answer is found to be totally incorrect, it should be marked
as (X) and awarded zero (0) Marks.
12. Any unassessed portion, non-carrying over of marks to the title page, or totaling error detected by
the candidate shall damage the prestige of all the personnel engaged in the evaluation work as also
of the Board. Hence, in order to uphold the prestige of all concerned, it is again reiterated that the
instructions be followed meticulously and judiciously.
13. The Examiners should acquaint themselves with the guidelines given in the Guidelines for spot
Evaluation before starting the actual evaluation.
14. Every Examiner shall also ensure that all the answers are evaluated, marks carried over to the title
page, correctly totaled and written in figures and words.
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #1/16]
15. The Board permits candidates to obtain a photocopy of the Answer Book on request in an RTI
application and also separately as a part of the re-evaluation process on payment of the processing
charges.
Specific Instructions:
● All programming questions have to be answered with respect to C++ Language / Python
only
● In C++ / Python, ignore case sensitivity for identifiers (Variable / Functions / Structures /
Class Names)
● In Python indentation is mandatory, however, the number of spaces used for indenting
may vary
● In SQL related questions – both ways of text/character entries should be acceptable 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 SQL
statements
● In SQL related questions, ignore case sensitivity.
SECTION A
Q1 (a) Which of the following is not a valid variable name in Python. Justify reason for [1]
it not being a valid name:
(i) 5Radius (ii)Radius_ (iii) _Radius (iv) Radius
Ans (i) 5Radius
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #2/16]
Ans W=input('Enter a word') //Error 1
if W == 'Hello' : //Error 2,Error 3
print('Ok')
else : //Error 4
print('Not Ok')
(½ Marks for writing correction for Error 1)
(½ Marks for writing correction for Error 2
(½ Marks for writing correction for Error 3)
(½ Marks for writing correction for Error 4)
NOTE:
(1 mark for only identifying all the errors without writing corrections)
(e) Find and write the output of the following python code: [2]
def ChangeVal(M,N):
for i in range(N):
if M[i]%5 == 0 :
M[i] //= 5
if M[i]%3 == 0 :
M[i] //= 3
L=[ 25,8,75,12]
ChangeVal(L,4)
for i in L :
print(i, end='#')
Ans 5#8#5#4#
(½ Mark for writing each correct value)
OR
(Only ½ Mark for writing all ‘#’ at proper places)
Note:
● Deduct only ½ Mark for not considering any or all correct placements of #
(f) Find and write the output of the following python code: [3]
def Call(P=40,Q=20):
P=P+Q
Q=P-Q
print(P,'@',Q)
return P
R=200
S=100
R=Call(R,S)
print (R,'@',S)
S=Call(S)
print(R,'@',S)
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #3/16]
(1½ Mark for writing each correct 2 lines of output)
NOTE:
Deduct only ½ Mark for not considering any or all line break
(g) What possible outputs(s) are expected to be displayed on screen at the time of [2]
execution of the program from the following code? Also specify the minimum
and maximum values that can be assigned to the variable End .
import random
Colours = ["VIOLET","INDIGO","BLUE","GREEN",
"YELLOW","ORANGE","RED"]
End = randrange(2)+3
Begin = randrange(End)+1
for i in range(Begin,End):
print(Colours[i],end="&")
Q2 (a) Write the names of the immutable data objects from the following: [1]
(i) List (ii) Tuple (iii) String (iv) Dictionary
Ans (ii) Tuple (iii) String
(½ Mark for writing each correct option)
(b) Write a Python statement to declare a Dictionary named ClassRoll with Keys [1]
as 1,2,3 and corresponding values as 'Reena', 'Rakesh', 'Zareen'
respectively.
Ans ClassRoll = {1:"Reena", 2:"Rakesh", 3:"Zareen"}
(1 Mark for writing correct declaration statement)
(c) Which of the option out of (i) to (iv) is the correct data type for the [1]
variable Vowels as defined in the following Python statement:
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #4/16]
(1 Mark for writing correct output)
(e) Write the output of the following Python code: [1]
def Update(X=10):
X += 15
print( 'X = ', X)
X=20
Update()
print( 'X = ', X)
Ans X = 25
X = 20
(½ Mark for writing each correct line of output)
(f) Differentiate between “w” and “r” file modes used in Python while opening a [2]
data file. Illustrate the difference using suitable examples.
Ans A file is opened using “w” mode to write content into the file.
A file is opened using “r” mode to read content into the file.
Example:
def Create():
file=open('NOTES.TXT','w')
S="This is a sample"
file.write(S)
file.close()
def Read():
file=open('NOTES.TXT','r')
Lines=file.readline();
print(Lines)
file.close()
Create();
Read();
(½ Mark for writing correct usage of ’w’ mode)
(½ Mark for writing correct usage of ’r’ mode)
(g) A pie chart is to be drawn(using pyplot) to represent Pollution Level of Cities. [2]
Write appropriate statements in Python to provide labels for the pie slices as
the names of the Cities and the size of each pie slice representing the
corresponding Pollution of the Cities as per the following table:
Cities Pollution
Mumbai 350
Delhi 475
Chennai 315
Bangalore 390
Ans
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #6/16]
The file contains many sentences.
Ans def Show_words():
file=open('NOTES.TXT','r')
Lines = file.readlines()
for L in Lines:
W=L.split()
if (len(W)==5):
print(L)
file.close()
(½ Mark for correctly opening the file)
(½ Mark for reading all lines)
(½ Mark for correct loop to iterate for each line)
(½ Mark for displaying each line having 5 words in it)
(i) Write a Recursive function in Python RecsumNat(N), to return the sum of [3]
the first N natural numbers. For example, if N is 10 then the function
should return (1 + 2 + 3 + ... + 10 = 55).
Ans def RecsumNat(N):
if N==1:
return N
else:
return N+RecsumNat(N-1)
(1 Mark for checking the recursion termination condition)
(1 Mark for returning correct value on recursion termination)
(1 Mark for returning correct value on recursion)
OR
Write a Recursive function in Python Power(X,N), to return the result of X
raised to the power N where X and N are non-negative integers. For example, if
X is 5 and N is 3 then the function should return the result of(5)3 i.e. 125
Ans def Power(X,N):
if N==1:
return X
else:
return X*Power(X,N-1)
(1 Mark for checking the recursion termination condition)
(1 Mark for returning correct value on recursion termination)
(1 Mark for returning correct value on recursion)
(j) Write functions in Python for PushS(List) and for PopS(List) for performing Push [4]
and Pop operations with a stack of List containing integers.
Ans def PushS(List):
N=int(input("Enter integer"))
List.append(N)
def PopS(List):
if (List==[]):
print("Stack empty")
else:
print ("Deleted integer :",List.pop())
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #7/16]
(½ Mark for writing correct PushS() header)
(½ Mark for writing correct input for integer)
(½ Mark for adding the entered integer into the List)
(½ Mark for writing correct PopS() header)
(½ Mark for checking empty list condition)
(½ Mark for displaying “Stack empty”)
(1 Mark for displaying and deleting value from the list)
OR
Write functions in Python for InsertQ(Names) and for RemoveQ(Names) for
performing insertion and removal operations with a queue of List which
contains names of students.
Ans def InsertQ(Names):
Name=input("enter Name to be inserted: ")
List.append(Name)
def DeleteQ(Names):
if (Names==[]):
print("Queue empty")
else:
print ("Deleted integer is: ",Names[0])
del(Names[0])
(½ Mark for writing correct InsertQ header)
(½ Mark for accepting a name from user)
(½ Mark for adding the entered name in the List)
(½ Mark for writing correct DeleteQ header)
(½ Mark for checking empty queue condition)
(½ Mark for displaying “Queue empty”)
(½ Mark for displaying the name to be deleted)
(½ Mark for deleting name from the List)
SECTION B
(b) _________ is a network tool used to test the download and upload broadband [1]
speed.
Ans Speedtest
(d) _______________ is a network tool used to determine the path packets take [1]
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #8/16]
from one IP address to another.
Ans Traceroute
(f) Match the ServiceNames listed in the first column of the following table with [2]
their corresponding features listed in the second column of the table:
Technology Feature
1G ● IP based Protocols (LTE)
● True Mobile Broadband
2G ● Improved Data Services with Multimedia
● Mobile Broadband
3G ● Basic Voice Services
● Analog-based protocol
4G ● Better Voice Services
● Basic Data Services
● First digital standards (GSM,CDMA)
(g) What is a secure communication? Differentiate between HTTP and HTTPS. [3]
Ans Secure communication is when two entities are communicating and do not
want a third party to listen in.
The primary difference between HTTP (Hypertext Transfer Protocol) and HTTPS
(Hypertext Transfer Protocol Secure) is that HTTP is not secure whereas HTTPS
is a secure protocol which uses TLS/SSL certificate to ensure the authentication.
(1 mark for writing correct explanation of Secure Communication)
(1 mark for writing correct explanation HTTP)
(1 mark for writing correct explanation HTTPS)
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #9/16]
(h) Helping Hands is an NGO with its head office at Mumbai and branches located at [4]
Delhi, Kolkata and Chennai. Their Head Office located at Delhi needs a
communication network to be established between the head office and all the
branch offices. The NGO has received a grant from the national government for
setting up the network. The physical distances between the branch offices and
the head office and the number of computers to be installed in each of these
branch offices and the head office are given below. You as a network expert
have to suggest the best possible solutions for the queries as raised by the NGO.
as given in (i) to (iv).
Distances between various locations in Kilometres:
Mumbai H.O. to Delhi 1420
Mumbai H.O. to Kolkata 1640
Mumbai H.O. to Chennai 2710
Delhi to Kolkata 1430
Delhi to Chennai 1870
Chennai to Kolkata 1750
(i) Suggest by drawing the best cable layout for effective network connectivity
of all the Branches and the Head Office for communicating data.
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #10/16]
Ans
(ii) Suggest the most suitable location to install the main server of this NGO to
communicate data with all the offices.
Ans MUMBAI H.O.
(iii) Write the name of the type of network out of the following, which will be
formed by connecting all the computer systems across the network:
(A) WAN (B)MAN (C) LAN (D) PAN
Ans (A) WAN
(iv) Suggest the most suitable medium for connecting the computers installed
across the network out of the following:
(A) Optical Fibre (B) Telephone wires (C) Radio Waves (D) Ethernet cable
SECTION C
Q4 (a) Which SQL command is used to add a new attribute in a table? [1]
(b) Which SQL aggregate function is used to count all records of a table ? [1]
Ans COUNT(*)
(c) Which clause is used with a SELECT command in SQL to display the records in [1]
ascending order of an attribute?
Ans ORDER BY
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #11/16]
(d) Write the full form of the following abbreviations: [1]
(i) DDL (ii) DML
Ans (i) DDL : Data Definition Language
(ii) DML : Data Manipulation Language
(½ Mark for writing correct full form of DDL)
(½ Mark for writing correct full form of DML)
(e) Observe the following table EMPLOYEES and DEPARTMENT carefully and answer [2]
the questions that follow:
(i) What is the Degree of the table EMPLOYEES ? What is the cardinality of the
table DEPARTMENT?
Ans Degree of the table EMPLOYEES = 4
Cardinality of the table DEPARTMENT = 3
(½ Mark for writing correct Degree of the table EMPLOYEES)
(½ Mark for writing correct Cardinality of the table DEPARTMENT)
(ii) What is a Primary Key ? Explain.
Ans A Primary Key is an attribute of a Table which has a unique value for
each of the records and can be used to identify a record of the table.
OR
Any equivalent explanation conveying the correct explanation for a
Primary Key
(1 Mark for writing the correct explanation for Primary Key)
OR
Differentiate between Selection and Projection operations in context of a
Relational Database. Also, illustrate the difference with one supporting
example of each.
Ans Selection : Operation upon a relation to select a horizontal subset of
the relation.
Projection : Operation upon a relation to select a vertical subset of the
relation.
Example:
TABLE: EMPLOYEES
ENO ENAME DOJ DNO
E1 NUSRAT 2001-11-21 D3
E2 KABIR 2005-10-25 D1
A selection upon Employees for tuples whose DOJ is in the year 2005 will result
into
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #12/16]
TABLE: EMPLOYEES
ENO ENAME DOJ DNO
E2 KABIR 2005-10-25 D1
A projection upon Employees for ENAME and DOJ of all Employees will result
into
TABLE: EMPLOYEES
ENAME DOJ
NUSRAT 2001-11-21
KABIR 2005-10-25
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #13/16]
Ans MAX(PUR_DATE)
2019-05-09
(½ Mark for writing correct output with or without column headings)
(h) Write SQL queries for (i) to (iv), which are based on the tables: CUSTOMERS and [4]
PURCHASES given in the question 4(g):
(i) To display details of all CUSTOMERS whose CITIES are neither Delhi nor
Mumbai
Ans SELECT * FROM CUSTOMERS WHERE CITIES NOT
IN('DELHI','MUMBAI');
OR
SELECT * FROM CUSTOMERS WHERE CITIES<>'DELHI' AND
CITIES<>'MUMBAI';
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #14/16]
Ans (C) E-Waste
(1 Mark for writing the correct option)
(b) Data which has no restriction of usage and is freely available to everyone under [1]
Intellectual Property Rights is categorised as:
(A) Open Source (B) Open Data (C) Open Content (D) Open Education
Ans (B) Open Data
(1 Mark for writing the correct option)
(c) What is a Unique Id? Write the name of the Unique Identification provided by [2]
Government of India for Indian Citizens.
Ans Unique identifier (UID) is any identifier which is guaranteed to be unique among
all objects and is used for identifying various objects.
The Unique Identification provided by the Government of India for Indian
Citizens is Aadhaar.
(1 Mark for writing the correct explanation for Unique Id)
(1 Mark for writing the correct name of the Unique Id)
(d) Consider the following scenario and answer the questions which follow: [2]
“A student is expected to write a research paper on a topic. The
student had a friend who took a similar class five years ago. The
student asks his older friend for a copy of his paper and then takes
the paper and then submits the entire paper as his own research work
”
(i) Which of the following activities appropriately categorises the act of the
writer:
(A) Plagiarism (B) Spamming (C) Virus (D) Phishing
(ii) Which kind of offense out of the following is made by the student?
(A) Cyber Crime (B) Civil Crime (C) Violation of Intellectual Property
Rights
Ans (i) (A) Plagiarism
(ii) (C) Violation of Intellectual Property Rights
(1 Mark for writing the correct option)
(1 Mark for writing the correct option)
(e) What are Digital Rights? Write examples for two digital rights applicable to [2]
usage of digital technology.
Ans Digital Rights: The right and freedom to use all types of digital technology in an
acceptable and appropriate manner as well as the right to privacy and the
freedom of personal expression while using any digital media.
Examples: (Any two)
Right of privacy for personal data existing with private organisations.
Right to access the Internet without tampering upon speed or bandwidth.
Right to un-tweaked information on news channels and social media.
Right to any kind of access to content on the web.
Right to downloads or uploads.
Right to unrestricted communication methods (email, chat, IM, etc.).
OR
Any other 2 correct examples of digital rights
(1 Mark for writing the correct explanation for Digital Rights)
(½ Mark for writing each correct example of a digital right)
(f) Suggest techniques which can be adopted to impart Computer Education for: [2]
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #15/16]
(i) Visually impaired students (someone who cannot write).
(ii) Speech impaired students (someone who cannot speak).
Ans (i) For visually impaired or blind users, programs like JAWS read any text out
loud. Screen-magnification programs assist partially sighted computer users.
Braille keyboards or pointers attached to the mouth, finger, head or knee
can also be used.
(ii) Software such as speech synthesizer enables non-verbal persons to convey
virtually any thought in their minds by providing them an 'artificial voice'.
(1 mark for writing correct suggestion for visually impaired students )
(1 mark for writing correct suggestion for speech impaired students )
[Sub Code: 083 Series: HMJ/C Paper Code: 91/C] [Page #16/16]
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
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
● All programming questions have to be answered with respect to C++ Language /
Python only
● In C++ / Python, ignore case sensitivity for identifiers (Variable / Functions /
Structures / Class Names)
● In Python indentation is mandatory, however, number of spaces used for
indenting may vary
● In SQL related questions – both ways of text/character entries should be
acceptable 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 SQL
statements
● In SQL related questions, ignore case sensitivity.
SECTION A - (Only for candidates, who opted for C++)
1 (a) Write the type of C++ tokens (keywords and user defined identifiers) from the 2
following:
(i) else (ii) Long (iii) 4Queue (iv) _count
(b) The following C++ code during compilation reports errors as follows: 1
Error: ‘ofstream’ not declared
Error: ‘strupr’ not declared
Error: ‘strcat’ not declared
Error: ‘FIN’ not declared
Write the names of the correct header files, which must be included to compile
the code successfully:
void main()
{
ofstream FIN("WISH.TXT");
char TEXT2[]="good day";
char TEXT1[]="John!";
strupr(TEXT2);
strcat(TEXT1, TEXT2);
FIN<<TEXT1<<endl;
}
Page #1/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(c) Rewrite the following C++ code after removing any/all syntactical errors with 2
each correction underlined.
Note: Assume all required header files are already included in the program.
Typedef Count int;
void main()
{
Count C;
cout<<"Enter the count:";
cin>>C;
for (K = 1; K<=C; K++)
cout<< C "*" K <<endl;
}
(d) Find and write the output of the following C++ program code: 3
Note: Assume all required header files are already included in the program.
void Revert(int &Num, int Last=2)
{
Last=(Last%2==0)?Last+1:Last-1;
for(int C=1; C<=Last; C++)
Num+=C;
}
Page #2/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
void main()
{
int A=20,B=4;
Revert(A,B);
cout<<A<<"&"<<B<<endl;
B--;
Revert(A,B);
cout<<A<<"#"<<B<<endl;
Revert(B);
cout<<A<<"#"<<B<<endl;
}
Ans 35&4
38#3
38#9
(e) Find and write the output of the following C++ program code: 2
Note: Assume all required header files are already included in the program.
#define Modify(N) N*3+10
void main()
{
int LIST[]={10,15,12,17};
int *P=LIST, C;
for(C=3; C>=0; C--)
LIST[I]=Modify(LIST[I]);
for (C=0; C<=3; C++)
{
cout<<*P<<":";
P++;
}
}
Page #3/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(f) Look at the following C++ code and find the possible output(s) from the options 2
(i) to (iv) following it. Also, write the highest and lowest values that can be
assigned in the array A.
Note:
● Assume all the required header files are already being included in the code.
● The function random(n) generates an integer between 0 and n-1.
void main()
{
randomize();
int A[4], C;
for(C=0; C<4; C++)
A[C]=random(C+1)+10;
for(C=3; C>=0; C--)
cout<<A[C]<<"@";
}
(i) (ii)
13@10@11@10@ 15$14$12$10$
(iii) (iv)
12@11@13@10@ 12@11@10@10@
(½ Mark for writing each correct Maximum and Maximum value in array A)
Page #4/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Option [ii]
Functions 1,2,4,5 are overloaded
Reason: Function 3 and 6 not considered in this case because it would give
redeclaration error for Function 5
OR Any equivalent valid reason
OR
Option [iii]
Functions 1,2,4,6 are overloaded
Reason: Function 3 and 5 not considered in this case because it would give
redeclaration error for Function 6
OR Any equivalent valid reason
NOTE:
● Deduct ½ Mark for not stating the reason
● 1 Mark for partially correct answer
OR
(1 Mark for writing only any 2 Functions from Options [i] / [ii] / [iii])
(1½ Mark for writing only any 3 Functions from Options [ii] / [iii])
(b) Observe the following C++ code and answer the questions (i) and (ii).
Note: Assume all necessary files are included.
class FIRST
{
int Num1;
public:
void Display() //Member Function 1
{
cout<<Num1<<endl;
}
};
class SECOND: public FIRST
{
int Num2;
public:
void Display() //Member Function 2
{
cout<<Num2<<endl;
}
};
void main()
{
Page #5/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
SECOND S;
___________________ //Statement 1
___________________ //Statement 2
}
Ans Inheritance
OR
Encapsulation
OR
Data Abstraction
OR
Data Hiding
(1 Mark for writing any correct OOP feature from the given answers)
(ii) Write Statement 1 and Statement 2 to execute Member Function 1 and Member 1
Function 2 respectively using the object S.
(c) Write the definition of a class CONTAINER in C++ with the following description: 4
Private Members
- Radius,Height // float
- Type // int (1 for Cone,2 for Cylinder)
- Volume // float
- CalVolume() // Member function to calculate
// volume as per the Type
Type Formula to calculate Volume
1 3.14*Radius*Height
2 3.14*Radius*Height/3
Public Members
- GetValues() // A function to allow user to enter value
// of Radius, Height and Type. Also, call
// function CalVolume() from it.
- ShowAll() // A function to display Radius, Height,
// Type and Volume of Container
Page #6/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
{
float Radius, Height;
int Type;
float Volume;
void CalVolume();
public:
void GetValues();
void ShowAll();
};
void CONTAINER::GetValues()
{
cin>>Radius>>Height>>Type ;
CalVolume();
}
void CONTAINER::ShowAll()
{
cout<<Radius<<Height<<Type<<Volume<<endl;
}
OR
void CONTAINER::CalVolume() void CONTAINER::CalVolume()
{ {
if (Type == 1) switch (Type)
Volume=3.14*Radius*Height; {
else if (Type == 2) case 1:
Volume=3.14*Radius*Height/3; Volume =3.14*Radius*Height;
} break;
case 2:
Volume=3.14*Radius*Height/3;
}
}
Page #7/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(ii) Write the names of all the members, which are directly accessible by the member
function View() of class Schedule.
Ans Start(), DD, MM, YYYY
Display(), Initiate(), Title
Enter(), Show(), Name
View() // Optional
(1 Mark for writing all correct member names )
Page #8/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
NOTE:
● Marks not to be awarded for partially correct answer
● Ignore the mention of Constructors
(iii) Write the names of all the members, which are directly accessible by the object S
of class Schedule declared in the main() function.
Ans View(), Start()
Display(), Initiate()
(1 Mark for writing all correct member names )
NOTE:
● Marks not to be awarded for partially correct answer
● Ignore the mention of Constructors
(iv) What will be the order of execution of the constructors, when the object S of class
Schedule is declared inside main() function?
Ans Course(), Teacher(), Schedule()
Page #9/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(c) Let us assume Data[20][15] is a two dimensional array, which is stored in the 3
memory along the row with each of its element occupying 2 bytes, find the
Page #10/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
LOC(Data[I][J]) = Base(Data)+W*(NC*(I-LBR)+(J-LBC))
Taking LBR=0, LBC=0
LOC(Data[15][10]) = Base(Data)+2*(15*15+10)
15000 = Base(Data)+2*(15*15+10)
Base(Data) = 15000 - 2*(235)
Base(Data) = 15000 - 470
Base(Data) = 14530
LOC(Data[I][J]) = Base(Data)+W*(NC*(I-LBR)+(J-LBC))
Taking LBR=1, LBC=1
LOC(Data[15][10]) = Base(Data)+2*(15*14+9)
15000 = Base(Data)+2*(15*14+9)
Base(Data) = 15000 - 2*(219)
Base(Data) = 15000 - 438
Base(Data) = 14562
NOTE:
● Marks to be awarded for calculating the address taking LBR and LBC = 1
(d) Write the definition of a member function AddPacket() for a class QUEUE in C++, 4
to remove/delete a Packet from a dynamically allocated QUEUE of Packets
considering the following code is already written as a part of the program.
struct Packet
{
int PID;
Page #11/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
char Address[20];
Packet *LINK;
};
class QUEUE
{
Packet *Front, *Rear;
public:
QUEUE(){Front=NULL;Rear=NULL;}
void AddPacket();
void DeletePacket();
~QUEUE();
};
Ans void QUEUE::AddPacket()
{
if(Front != NULL)
{
Packet *T;
T=Front;
cout<<Front->PID<<Front->Address<<" removed"<<endl;
//OR cout<<T->PID<<T->Address<<" removed"<<endl;
Front = Front->LINK;
delete T;
if (Front==NULL)
Rear=NULL;
}
else
cout<< "Queue Empty"<<endl;
}
OR
Any other equivalent code in C++
(1 Mark for checking EMPTY condition)
(½ Mark for declaring Packet T)
(½ Mark for assigning Front to T)
(½ Mark for deleting the previous Front Packet)
(½ Mark for changing LINK of Front)
(1 Mark for reassigning Rear with NULL if Queue becomes empty on
deletion)
NOTE:
● Marks should not be deducted if function header is written as
void QUEUE::DeletePacket()instead of
void QUEUE::AddPacket()
● 4 Marks to be awarded if Addition of Packet is done in place of
Deletion according to the following distribution
● ( 1 Mark for creating a new Packet)
● ( ½ Mark for entering data for the new Packet)
● ( ½ Mark for assigning NULL to link of the new Packet)
● ( ½ Mark for assigning Front to the first Packet as Front = T)
Page #12/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Page #13/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Write a function definition for HashDisplay() in C++ that would display the entire
content of the file MATTER.TXT in the desired format.
Example:
If the file MATTER.TXT has the following content stored in it:
THE WORLD IS ROUND
Page #14/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
int Count=0;
SCHOOLS S;
while(F.read((char*)&S,sizeof(S)))
Count += S.RNOT();
Page #15/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
fstream SFIN;
SFIN.open("SCHOOLS.DAT",ios::binary|ios::in);
SCHOOLS S;
SFIN.seekg(5*sizeof(S));
SFIN.read((char*)&S, sizeof(S));
S.Display();
cout<<"Record :"<<SFIN.tellg()/sizeof(S) + 1<<endl;
SFIN.close();
}
Ans 1004#Holy Education School#140
Record :7
(½ Mark for displaying correct values of Record 6 )
(½ Mark for displaying correct value of SFIN.tellg()/sizeof(B) + 1)
Page #16/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(c) Rewrite the following code in python after removing all syntax error(s). Underline 2
each correction done in the code.
Val = int(rawinput("Value:"))
Adder = 0
for C in range(1,Val,3)
Adder+=C
if C%2=0:
Print C*10
Else:
print C*
print Adder
Ans Val = int(raw_input("Value:")) # Error 1
Adder = 0
OR
Corrections mentioned as follows:
raw_input in place of rawinput
: to be placed in for
== in place of =
print in place of Print
else in place of Else
C* is invalid, replaced by a suitable integer or C
(½ Mark for each correction, not exceeding 2 Marks)
OR
(1 mark for identifying the errors, without suggesting corrections)
(d) Find and write the output of the following python code: 2
Data = ["P",20,"R",10,"S",30]
Times = 0
Alpha = ""
Add = 0
for C in range(1,6,2):
Times= Times + C
Page #17/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Note:
● ½ Mark deduction for not considering all line changes
(e) Find and write the output of the following python code: 3
class GRAPH:
def __init__(self,A=50,B=100):
self.P1=A
self.P2=B
def Up(self,B):
self.P2 = self.P2 - B
def Down(self,B):
self.P2 = self.P2 + 2*B
def Left(self,A):
self.P1 = self.P1 - A
def Right(self,A):
self.P1 = self.P1 + 2*A
def Target(self):
print "(",self.P1.":",self.P2,")"
G1=GRAPH(200,150)
G2=GRAPH()
G3=GRAPH(100)
G1.Left(10)
G2.Up(25)
G3.Down(75)
G1.Up(30)
G3.Right(15)
G1.Target()
G2.Target()
G3.Target()
Ans ( 190 : 120 )
( 50 : 75 )
( 130 : 250 )
( 1 mark for each correct line of output)
OR
( Full 3 marks to be awarded if "E o Output" in
rror" / "N
print "(",self.P1.":",self.P2,")" is mentioned)
Note:
● Deduct ½ Mark for not writing any or all ':' / '(' / ')' symbol(s)
Page #18/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
● Deduct ½ Mark for not considering any or all line breaks at proper
place(s)
(f) What possible outputs(s) are expected to be displayed on screen at the time of 2
execution of the program from the following code? Also specify the maximum
values that can be assigned to each of the variables BEGIN and LAST.
import random
POINTS=[20,40,10,30,15];
POINTS=[30,50,20,40,45];
BEGIN=random.randint(1,3)
LAST=random.randint(2,4)
for C in range(BEGIN,LAST+1):
print POINTS[C],"#",
NOTE: No marks to be awarded for writing any other option or any other
combination
2 (a) What is the advantage of super() function in inheritance? Illustrate the same with 2
the help of an example in Python.
Ans In Python, super() function is used to call the methods of base class which have
been extended in derived class.
class person(object):
def __init__(self,name,age):
self.name=name
self.age=age
def display(self):
Page #19/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
V1=Vehicle("BMW") #Line 7
V1.Show() #Line 8
Vehicle.Type="Bus" #Line 9
V2=Vehicle("VOLVO") #Line 10
V2.Show() #Line 11
(i) What is the difference between the variable in Line 2 and Line 4 in the above
Python code?
Ans The variable in Line 2 is a class attribute. This belongs to the class itself.
These attributes will be shared by all the instances.
The variable in Line 4 is an instance attribute. Each instance creates a
separate copy of these variables.
(1 mark for correct difference)
Instance Attributes
- Radius,Height # Radius and Height of Container
- Type # Type of Container
- Volume # Volume of Container
Page #20/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Methods
- CalVolume() # To calculate volume
# as per the Type of container
# With the formula as given below:
Type Formula to calculate Volume
def CalVolume(self):
if self.Type == 1:
self.Volume = 3.14 * self.Radius * self.Height
elif self.Type ==3:
self.Volume = 3.14 * self.Radius * self.Height /3
def GetValue(self):
self.Radius = input("Enter Radius")
self.Height = input("Enter Height")
self.Type = input("Enter type")
self.CalVolume() # OR CalVolume(self)
def ShowContainer(self):
print self.Radius
print self.Height
print self.Type
print self.Volume
(½ Mark for correct syntax for class header)
(½ Mark for correct declaration of instance attributes)
(1 Mark for correct definition of CalVolume() function)
(1 Mark for correct definition of GetValue() with proper invocation of
CalVolume( ))
(1 Mark for correct definition of ShowContainer())
Page #21/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
NOTE:
● Deduct ½ Mark if CalVolume() is not invoked properly inside NewBox()
function
● Marks not to be deducted for replacing the Formulae for calculating
the Volumes with correct Formulae
(d) Answer the questions (i) to (iv) based on the following: 4
Class Top1(object):
def __init__(self,tx): #Line 1
self.X=tx #Line 2
def ChangeX(self,tx):
self.X=self.X+tx
def ShowX(self):
print self.X
Class Top2(object):
def __init__(self,ty): #Line 3
self.Y=ty #Line 4
def ChangeY(self,ty):
self.Y=self.Y+ty
def ShowY(self):
print self.Y,
class Bottom(Top1,Top2):
def __init__(self,tz): #Line 5
self.Z = tz #Line 6
Top2.__init__(self,2*tz) #Line 7
Top1.__init__(self,3*tz) #Line 8
def ChangeZ(self,tz):
self.Z=self.Z+tz
self.ChangeY(2*tz)
self.ChangeX(3*tz)
def ShowZ(self):
print self.Z,
self.ShowY()
self.ShowX()
B=Bottom(1)
B.ChangeZ(2)
B.ShowZ()
(i) Write the type of the inheritance illustrated in the above.
Page #22/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Ans 3 6 9
OR
“Error” / “No Output”
(1 Mark for writing correct answer)
(iii) What are the methods shown in Line 1, Line 3 and Line 5 are known as?
Ans Constructors
(iv) What is the difference between the statements shown in Line 6 and Line 7?
Ans Initializing the member of child class in Line 6 and calling the parent class
constructor in Line 7
(1 Mark for writing correct answer)
(b) Write definition of a method ZeroEnding(SCORES) to add all those values in the 3
list of SCORES, which are ending with zero (0) and display the sum.
For example,
If the SCORES contain [200,456,300,100,234,678]
Page #23/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Page #24/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
for P in PLACES:
if len(P)>5:
print P
(1 Mark for correct loop)
(½ Mark for checking length of place name)
(½ Mark for display desired place names)
(e) Evaluate the following Postfix notation of expression: 2
22,11,/,5,10,*,+,12,-
Ans
Element Stack Contents
22 22
11 22, 11
/ 2
5 2, 5
10 2, 5, 10
* 2, 50
+ 52
12 52, 12
- 40
OR
Any other way of stepwise evaluation
(½ Mark for evaluation till each operator)
OR
(1 Mark for only writing the correct answer without showing stack
status)
4 (a) Write a statement in Python to open a text file STORY.TXT so that new contents 1
can be added at the end of it.
Ans file= open("STORY.TXT","a") OR file.open("STORY.TXT","a")
(b) Write a method in python to read lines from a text file INDIA.TXT, to find and 2
display the occurrence of the word “India”.
For example:
If the content of the file is
_______________________________________________________________________
“India is the fastest growing economy.
India is looking for more investments around the globe.
The whole world is looking at India as a great market.
Most of the Indians can foresee the heights that India is
capable of reaching.”
_______________________________________________________________________
The output should be 4
Page #25/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Page #26/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
file.close()
(½ Mark for correct function header)
(½ Mark for opening the file CINEMA.DAT correctly)
(½ Mark for correct loop)
(½ Mark for correct load())
(½ Mark for correct checking of MTYPE)
(½ Mark for displaying the record)
TABLE: VIDEO
VNO VNAME TYPE
F101 The Last Battle Fiction
C101 Angels and Devils Comedy
A102 Daredevils Adventure
TABLE: MEMBER
MNO MNAME
M101 Namish Gupta
M102 Sana Sheikh
M103 Lara James
FINAL RESULT
VNO VNAME TYPE MNO MNAME
F101 The Last Battle Fiction M101 Namish Gupta
F101 The Last Battle Fiction M102 Sana Sheikh
F101 The Last Battle Fiction M103 Lara James
C101 Angels and Devils Comedy M101 Namish Gupta
C101 Angels and Devils Comedy M102 Sana Sheikh
C101 Angels and Devils Comedy M103 Lara James
A102 Daredevils Adventure M101 Namish Gupta
A102 Daredevils Adventure M102 Sana Sheikh
A102 Daredevils Adventure M103 Lara James
Page #27/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
OR Option (iv)
DEGREE = 5
CARDINALITY = 9
(1 Mark for writing CARTESIAN PRODUCT OR Option (iv))
(½ Mark for writing correct Degree)
(½ Mark for writing correct Cardinality)
(b) Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which 6
are based on the tables.
Table: ACCOUNT
ANO ANAME ADDRESS
101 Nirja Singh Bangalore
102 Rohan Gupta Chennai
103 Ali Reza Hyderabad
104 Rishabh Jain Chennai
105 Simran Kaur Chandigarh
Table: TRANSACT
TRNO ANO AMOUNT TYPE DOT
T001 101 2500 Withdraw 2017-12-21
T002 103 3000 Deposit 2017-06-01
T003 102 2000 Withdraw 2017-05-12
T004 103 1000 Deposit 2017-10-22
T005 101 12000 Deposit 2017-11-06
(i) To display details of all transactions of TYPE Deposit from Table TRANSACT.
Page #28/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
OR
ANO NAME
A
101 Nirja Singh
102 Rohan Gupta
103 Ali Reza
104 Rishabh Jain
105 Simran Kaur
(½ Mark for correct output)
Page #29/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
6 (a) State any one Absorption Law of Boolean Algebra and verify it using truth table. 2
Ans X + X . Y = X
Verification:
X Y X.Y X+X.Y
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
OR
X . (X + Y)= X
Verification:
X Y X+Y X.(X+Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
OR
X + X’ . Y = X + Y
Verification:
X Y X’ X’.Y X+X’.Y X+Y
0 0 1 0 0 0
0 1 1 1 1 1
1 0 0 0 1 1
1 1 0 0 1 1
OR
Page #30/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
X . (X’+ Y)= X . Y
Verification:
X Y X’ X’+ Y X.(X’+Y) X.Y
0 0 1 1 0 0
0 1 1 1 0 0
1 0 0 0 0 0
1 1 0 1 1 1
(Full 2 Marks for drawing the Logic Circuit for the expression correctly)
OR
(½ Mark for drawing Logic circuit for (U’ + V) correctly)
(½ Mark for drawing Logic circuit for (V’ + W’) correctly)
(c) Derive a Canonical POS expression for a Boolean function FN, represented by the 1
following truth table:
X Y Z FN(X,Y,Z)
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Page #31/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(d) Reduce the following Boolean Expression to its simplest form using K-Map: 3
G(U,V,W,Z) = ∑(3,5,6,7,11,12,13,15)
OR
OR
Bus Topology Star Topology
Page #32/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
(1 Mark for writing any correct difference between Bus and Star
Topology)
(½ Mark for writing any correct advantage of Star Topology over Bus)
(½ Mark for writing any correct disadvantage of Star Topology over
Bus)
(b) Classify each of the following Web Scripting as Client Side Scripting and Server 2
Side Scripting:
(i) JavaScripting (ii) ASP (iii) VB Scripting (iv) JSP
Ans (i) Client Side Scripting / Server Side Scripting (ii) Server Side Scripting
(iii) Client Side Scripting (iv) Server Side Scripting
(½ Mark for writing each correct classification)
(c) Write the expanded names for the following abbreviated terms used in Networking 2
and Communications:
(i) SMTP (ii) VoIP (iii) GSM (iv) WLL
Ans (i) Simple Mail Transfer Protocol
(ii) Voice over Internet Protocol (Voice over IP)
(iii) Global System for Mobile Communication
(iv) Wireless Local Loop
(½ Mark for writing each correct expansion)
(d) CASE STUDY BASED QUESTION:
Ayurveda Training Educational Institute is setting up its centre in Hyderabad with
four specialised departments for Orthopedics, Neurology and Pediatrics along with
an administrative office in separate buildings. The physical distances between
these department buildings and the number of computers to be installed in these
departments and administrative office as given as follows. You as a network
Page #33/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Neurology 50
Orthopedics Unit 80
(i) Suggest the most suitable location to install the main server of this institution to 1
get efficient connectivity.
Page #34/35
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
Ans
OR
Administrative Office is connected to Orthopedic, Radiology, Pediatrics units
directly in a Star Topology
(1 Mark for drawing/writing the layout correctly)
(iii) Suggest the devices to be installed in each of these buildings for connecting 1
computers installed within the building out of the following:
● Gateway
● Modem
● Switch
Ans Switch
(1 Mark for writing the correct device)
(iv) Suggest the topology of the network and network cable for efficiently connecting 1
each computer installed in each of the buildings out of the following:
Topologies : Bus topology, Star Topology
Network Cable: Single Pair Telephone Cable, Coaxial Cable, Ethernet Cable
Ans Topology : Star Topology
Network Cable: Ethernet Cable / Coaxial Cable
(½ Mark for writing the correct topology)
(½ Mark for writing the correct network cable)
Page #35/35
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
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
● All programming questions have to be answered with respect to C++
Language / Python only
● In C++ / Python, ignore case sensitivity for identifiers (Variable / Functions
/ Structures / Class Names)
● In Python indentation is mandatory, however, number of spaces used for
indenting may vary
● In SQL related questions – both ways of text/character entries should be
acceptable 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
SQL statements
● In SQL related questions, ignore case sensitivity.
SECTION A - (Only for candidates, who opted for C++)
1 (a) Write the type of C++ tokens (keywords and user defined identifiers) from the 2
following:
(i) For
(ii) delete
(iii) default
(iv) Value
Page #1 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(c) Rewrite the following C++ code after removing any/all syntactical errors 2
with each correction underlined.
Note: Assume all required header files are already being included in the
program.
void main()
{
cout<<"Enter an integer";
cin>>N;
switch(N%2)
case 0 cout<<"Even"; Break;
case 1 cout<<"Odd" ; Break;
}
(d) Find and write the output of the following C++ program code: 2
Note: Assume all required header files are already included in the
program.
#define Big(A,B) (A>B)?A+1:B+2
void main()
Page #2 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
{
char W[] = "Exam";
int L=strlen(W);
for(int i =0; i<L-1; i++)
W[i] = Big(W[i],W[i+1]);
cout<<W<<endl;
}
Ans zyom
(e) Find and write the output of the following C++ program code: 3
Note: Assume all required header files are already being included in the program.
void main()
{
int A[]={10,12,15,17,20,30};
for(int i = 0; i<6; i++)
{
if(A[i]%2==0)
A[i] /= 2;
else if(A[i]%3==0)
A[i] /= 3;
if(A[i]%5==0)
A[i] /= 5;
}
for(i = 0; i<6; i++)
cout<<A[i]<<”#”;
}
Ans 1#6#1#17#2#3#
(f) Look at the following C++ code and find the possible output(s) from the options 2
(i) to (iv) following it. Also, write the maximum values that can be assigned to
each of the variables R and C.
Note:
● Assume all the required header files are already being included in the code.
● The function random(n) generates an integer between 0 and n-1
void main()
{
randomize();
Page #3 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
int R=random(3),C=random(4);
int MAT[3][3] = {{10,20,30},{20,30,40},{30,40,50}};
for(int I=0; I<R; I++)
{
for(int J=0; J<C; J++)
cout<<MAT[I][J]<<" ";
cout<<endl;
}
}
(i) (ii)
10 20 30 10 20 30
20 30 40 20 30 40
30 40 50
(iii) (iv)
10 20 10 20
20 30 20 30
30 40
2. (a) Differentiate between private and public members of a class in context of Object 2
Oriented Programming. Also give a suitable example illustrating
accessibility/non-accessibility of each using a class and an object in C++.
Page #4 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
Any other correct example demonstrating difference between private and
public members of a class
(Full 2 Marks for any one correct difference between private and public
members of a class using a suitable code in C++)
OR
(1 Mark for writing correct difference between private and public members
in a class without example)
(b) Observe the following C++ code and answer the questions (i) and (ii).
Note: Assume all necessary files are included.
class EXAM
{
long Code;
char EName[20];
float Marks;
public:
EXAM() //Member Function 1
{
Code=100;strcpy(EName,"Noname");Marks=0;
}
EXAM(EXAM &E) //Member Function 2
{
Code=E.Code+1;
strcpy(EName,E.EName);
Marks=E.Marks;
}
};
void main()
{
___________________ //Statement 1
___________________ //Statement 2
}
Page #5 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(c) Write the definition of a class RING in C++ with following description: 4
Private Members
- RingNumber // data member of integer type
- Radius // data member of float type
- Area // data member of float type
- CalcArea() // Member function to calculate and assign
// Area as 3.14 * Radius*Radius
Public Members
- GetArea() // A function to allow user to enter values of
// RingNumber and Radius. Also, this
// function should call CalcArea() to calculate
// Area
- ShowArea() // A function to display RingNumber, Radius
// and Area
Page #6 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
int A1;
protected:
float A2;
public:
One();
void Get1(); void Show1();
};
class Two : private One
{
int B1;
protected:
float B2;
public:
Two();
void Get2();
void Show();
};
class Three : public Two
{
int C1;
public:
Three();
void Get3();
void Show();
};
void main()
{
Three T; //Statement 1
__________________;//Statement 2
}
(i) Which type of Inheritance out of the following is illustrated in the above example?
-Single Level Inheritance, Multilevel Inheritance, Multiple Inheritance
NOTE:
● Marks not to be awarded for partially correct answer
● Ignore the mention of Constructors
(iii) Write Statement 2 to call function Show() of class Two from the object T of class
Three.
Page #7 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans T.Two::Show()
3 (a) Write the definition of a function Reverse(int Arr[], int N) in C++, which should 3
reverse the entire content of the array Arr having N elements, without using any
other array.
Example: if the array Arr contains
13 10 15 20 5
Then the array should become
5 20 15 10 13
NOTE:
● The function should only rearrange the content of the array.
● The function should not copy the reversed content in another array.
● The function should not display the content of the array.
2 1 3 4 5
3 4 1 2 5
Page #8 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
The function should calculate the sum and display the following:
Sum of Middle Row: 15
struct Member
{
int MNO;
char MNAME[20];
Member *Next;
Page #9 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
};
class QUEUE
{
Member *Rear,*Front;
public:
QUEUE(){Rear=NULL;Front=NULL;}
void ADDMEM();
void REMOVEMEM();
~QUEUE();
};
Ans (P+(((Q-R)*S)/T))
INFIX STACK POSTFIX
P P
+ + P
Q + PQ
- +- PQ
R +- PQR
Page #10 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
) + PQR-
* +* PQR-
S +* PQR-S
) + PQR-S*
/ +/ PQR-S*
T +/ PQR-S*T
) + PQR-S*T/
) PQR-S*T/+
OR
INFIX STACK POSTFIX
( (
P ( P
+ (+ P
( (+( P
Q (+( PQ
- (+(- PQ
R (+(- PQR
) (+ PQR-
* (+* PQR-
S (+* PQR-S
/ (+/ PQR-S*
T (+/ PQR-S*T
) PQR-S*T/+
4. (a) Aditi has used a text editing software to type some text. After saving the article as 3
WORDS.TXT, she realised that she has wrongly typed alphabet J in place of alphabet I
everywhere in the article.
Write a function definition for JTOI() in C++ that would display the corrected version of
entire content of the file WORDS.TXT with all the alphabets “J” to be displayed as an
alphabet “I” on screen.
Note: Assuming that WORD.TXT does not contain any J alphabet otherwise.
Example:
If Aditi has stored the following content in the file WORDS.TXT:
Page #11 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
A SENTENCE
void SHOW()
{
cout<<TID<<":"<<DEPT<<endl;
}
char *RDEPT(){return DEPT;}
};
Ans void COUNTDEPT()
{
ifstream F;
F.open("TEACHERS.DAT",
ios::binary);
int count=0;
Teachers obj;
Page #12 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
while(F.read((char*)&obj,
sizeof(obj)))
{
if(strcmp(obj.RDEPT(),“MATHS”)==0)
count++;
}
cout<<”Number of MATHS teachers :”<<count<<endl;
F.close(); //IGNORE
}
OR
Any other correct function definition
(½ Mark for opening TEACHERS.DAT correctly)
(½ Mark for reading records from TEACHERS.DAT)
(½ Mark for comparing DEPT of type MATHS(ignore case sensitive checking)
with strcmp or strcmpi)
(½ Mark for displaying the incremented count for matching records)
(c) Find the output of the following C++ code considering that the binary file 1
BOOK.DAT exists on the hard disk with a data of 200 books.
class BOOK
{
int BID;char BName[20];
public:
void Enter();void Display();
};
void main()
{
fstream InFile;
InFile.open("BOOK.DAT",ios::binary|ios::in);
BOOK B;
InFile.seekg(5*sizeof(B));
InFile.read((char*)&B, sizeof(B));
cout<<"Book Number:"<<InFile.tellg()/sizeof(B) + 1;
InFile.seekg(0,ios::end);
cout<<" of "<<InFile.tellg()/sizeof(B)<<endl;
InFile.close();
}
Page #13 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(2 marks for correct option)
NOTE:
Deduct ½ mark each for wrong options
(b) Name the Python Library modules which need to be imported to invoke the 1
following functions
(i) ceil() (ii) randint()
Ans (i) math (ii) random
Page #14 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
self.Ino=I
self.IName=N
self.Qty=int(Q);
def Buy(self,Q):
self.Qty = self.Qty + Q
def Sell(self,Q):
self.Qty -= Q
def ShowStock(self):
print self.Ino,":",self.IName,"#",self.Qty
I1=ITEM()
I2=ITEM(100,"Eraser",100)
I3=ITEM(102,"Sharpener")
I1.Buy(10)
I2.Sell(25)
I3.Buy(75)
I3.ShowStock()
I1.ShowStock()
I2.ShowStock()
Ans 102 : Sharpener # 85
101 : Pen # 20
100 : Eraser # 75
(1 mark for each correct line of output)
NOTE:
● Deduct ½ Mark for not writing any or all ‘:’ or ‘#’ symbol(s)
● Deduct ½ Mark for not considering any or all line breaks at proper place(s)
(f) What are the possible outcome(s) executed from the following code? Also specify 2
the maximum and minimum values that can be assigned to variable N.
import random
SIDES=["EAST","WEST","NORTH","SOUTH"];
N=random.randint(1,3)
OUT=""
for I in range(N,1,-1):
OUT=OUT+SIDES[I]
print OUT
(i) SOUTHNORTH (ii) SOUTHNORTHWEST
Page #15 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
def NewRing(self):
self.RingID=input("Enter RingID")
self.Radius=input("Enter radius")
self.AreaCal() # OR AreaCal(self)
def ViewRing(self):
print self.RingID
print self.Radius
print self.Area
Page #17 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
NOTE: Python does not support function overloading “as illustrated in
the example shown above”. If you run the code, the second Area(B,H)
definition will overwrite/override the first one.
(1 mark for each function definition)
OR
(Full 2 Marks for mentioning Python does not support function
overloading)
3. (a) What will be the status of the following list after the First, Second and Third pass 3
of the bubble sort method used for arranging the following elements in
descending order?
Note: Show the status of all the elements after each pass very clearly underlining
the changes.
152, 104, -100, 604, 190, 204
Ans I Pass
152 104 -100 604 190 204
152 104 -100 604 190 204
152 104 -100 604 190 204
152 104 604 -100 190 204
152 104 604 190 -100 204
152 104 604 190 204 -100
II Pass
152 104 604 190 204 -100
152 104 604 190 204 -100
152 604 104 190 204 -100
152 604 190 104 204 -100
152 604 190 204 104 -100
III Pass
152 604 190 204 104 -100
604 152 190 204 104 -100
604 190 152 204 104 -100
604 190 204 152 104 -100
(1 mark for last set of values of each correct pass)
(b) Write definition of a method OddSum(NUMBERS) to add those values in the list of 3
NUMBERS, which are odd.
Ans def OddSum(NUMBERS):
n=len(NUMBERS)
s=0
for i in range(n):
if (i%2!=0):
s=s+NUMBERS[i]
print(s)
(½ mark for finding length of the list)
( ½ mark for initializing s (sum) with 0)
( ½ mark for reading each element of the list using a loop)
( ½ mark for checking odd location)
( ½ mark for adding it to the sum)
( ½ mark for printing or returning the value)
Page #18 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(c) Write Addnew(Book) and Remove(Book) methods in Python to Add a new Book and 4
Remove a Book from a List of Books, considering them to act as PUSH and POP
operations of the data structure Stack.
Page #19 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
6 6, 24, 2, 6
+ 6, 24, 8
/ 6, 3
3
Answer: 3
(½ Mark for evaluation till each operator)
OR
(1 Mark for only writing the Final answer without showing stack
status)
4 (a) Differentiate between file modes r+ and w
+ with respect to Python. 1
Ans ● r+ Opens a file for both reading and writing. The file pointer
placed at the beginning of the file.
● w+ Opens a file for both writing and reading. Overwrites the
existing file if the file exists. If the file does not exist, creates a
new file for reading and writing.
(1 mark for one of the correct difference )
OR
(½ Mark for each correct use of r+ and w+)
(b) Write a method in Python to read lines from a text file DIARY.TXT, and display 2
those lines, which are starting with an alphabet ‘P’.
Ans def display():
file=open('DIARY.TXT','r')
line=file.readline()
while line:
if line[0]=='P' :
print line
line=file.readline()
file.close() #IGNORE
(½ Mark for opening the file)
(½ Mark for reading all lines)
(½ Mark for checking condition for line starting with P)
(½ Mark for displaying line)
(c) Considering the following definition of class COMPANY, write a method in Python 3
to search and display the content in a pickled file COMPANY.DAT, where CompID is
matching with the value ‘1005’.
class Company:
def __init__(self,CID,NAM):
self.CompID = CID #CompID Company ID
self.CName = NAM #CName Company Name
self.Turnover = 1000
def Display(self):
print self.CompID,":",self.CName,":",self.Turnover
Ans import pickle
def ques4c( ):
f=Factory( )
file=open('COMPANY.DAT','rb')
try:
Page #20 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
while True:
f=pickle.load(file)
if f.CompID==1005:
f.Display()
except EOF Error:
pass
file.close() #IGNORE
(½ Mark for correct function header)
(½ Mark for opening the file COMPANY.DAT correctly)
(½ Mark for correct loop)
(½ Mark for correct load( ))
(½ Mark for correct checking of CompID)
(½ Mark for displaying the record)
SECTION C - (For all the candidates)
5 (a) Observe the following table CANDIDATE carefully and write the name of the 2
RDBMS operation out of (i) SELECTION (ii) PROJECTION (iii) UNION (iv) CARTESIAN
PRODUCT, which has been used to produce the output as shown in RESULT ? Also,
find the Degree and Cardinality of the RESULT.
TABLE: CANDIDATE
NO NAME STREAM
C1 AJAY LAW
C2 ADITI MEDICAL
C3 ROHAN EDUCATION
C4 RISHAB ENGINEERING
RESULT
NO NAME
C3 ROHAN
(1 Mark for writing the correct RDBMS operation as any one of the
given options)
(½ Mark for writing correct degree)
(½ Mark for writing correct cardinality)
(b) Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which 6
are based on the tables
TABLE : BOOK
Code BNAME TYPE
F101 The priest Fiction
L102 German easy Literature
Page #21 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(i) To display all details from table MEMBER in descending order of ISSUEDATE.
Ans MAX(ISSUEDATE)
2017-02-23
Page #22 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(½ Mark for correct output)
Ans BNAME
German Easy
OR
BNAME
The priest
German easy
Tarzan in the lost world
Untold Story
War heroes
(½ Mark for writing any one of the above two outputs)
6 (a) State Distributive Laws of Boolean Algebra and verify them using truth table. 2
Page #23 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(ii)
X Y Z Y.Z X+Y.Z (X+Y) (X+Z) (X+Y).(X+Z)
0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1
Ans
(Full 2 Marks for drawing the Logic Circuit for the expression correctly)
OR
(½ Mark for drawing Logic circuit for (X NAND Y) correctly)
(½ Mark for drawing Logic circuit for (Y NAND Z) correctly)
(c) Derive a Canonical SOP expression for a Boolean function F, represented by 1
the following truth table:
U V W F(U,V,W)
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
Page #24 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
F(U,V,W)=∑(0,2,3,6)
Ans
OR
Ans Radio Link: Data is transmitted outward from the antenna through free space in
all directions. It is a Slow means of communication;
Page #25 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(Full 2 marks for any correct difference between Radio Link and Microwave)
OR
(1 Mark for writing correct features of any one wireless medium out of Radio
Link or Microwave)
(b) Amit used a pen drive to copy files from his friend’s laptop to his office computer. 2
Soon his office computer started abnormal functioning. Sometimes it would restart
by itself and sometimes it would stop functioning totally. Which of the following
options out of (i) to (iv), would have caused the malfunctioning of the computer.
Justify the reason for your chosen option:
(i) Computer Worm
(ii) Computer Virus
(iii) Computer Bacteria
(iv) Trojan Horse
Page #26 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
communication, data and resource sharing.
As a network consultant, you have to suggest the best network related solutions
for them for issues/problems raised in (i) to (iv), keeping in mind the distances
between various blocks/locations and other given parameters.
Account Block 50
Logistics Block 40
(i) Suggest the most appropriate block/location to house the SERVER in the 1
CHANDIGARH Office (out of the 3 Blocks) to get the best and effective
connectivity. Justify your answer.
Page #27 of 28
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
Page #28 of 28
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
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
● All programming questions have to be answered with respect to C++ Language /
Python only
● In C++ / Python, ignore case sensitivity for identifiers (Variable / Functions /
Structures / Class Names)
● In Python indentation is mandatory, however, number of spaces used for
indenting may vary
● In SQL related questions – both ways of text/character entries should be
acceptable 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 SQL
statements
● In SQL related questions, ignore case sensitivity.
Ans Price*Qty
float
Address One
do
(b) Jayapriya has started learning C++ and has typed the following program. When 1
she compiled the following code written by her, she discovered that she needs to
include some header files to successfully compile and execute it. Write the
names of those header files, which are required to be included in the code.
Page 1 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
void main()
{
float A,Number,Outcome;
cin>>A>>Number;
Outcome=pow(A,Number);
cout<<Outcome<<endl;
}
(c) Rewrite the following C++ code after removing any/all syntactical errors with 2
each correction underlined.
Note: Assume all required header files are already being included in the program.
Page 2 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(d) Find and write the output of the following C++ program code: 2
Note: Assume all required header files are already included in the
program.
typedef char STRING[80];
void MIXITNOW(STRING S)
{
int Size=strlen(S);
for (int I=0;I<Size1;I+=2)
{
char WS=S[I];
S[I]=S[I+1];
S[I+1]=WS;
}
for (I=1;I<Size;I+=2)
if (S[I]>=’M’ && S[I]<=’U’)
S[I]=’@’;
}
void main()
{
STRING Word=”CRACKAJACK”;
MIXITNOW(Word);
cout<<Word<<endl;
}
Ans RCCAAKAJKC
(e) Find and write the output of the following C++ program code: 3
Note: Assume all required header files are already being included in the program.
class Stock
{
long int ID;
Page 3 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans Date :1
1024#150
Date :29
2015#400
Date :20
1001#180
(½ Mark for each correct line of output)
Note:
● Deduct only
½ Mark for not writing any or all ‘Date’ OR ‘:’ OR ‘#’
symbol(s)
● Deduct
½ Mark for not considering any or all endl(s) at proper
Page 4 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
place(s)
(f) Look at the following C++ code and find the possible output(s) from the options 2
(i) to (iv) following it. Also, write the maximum and the minimum values that can
be assigned to the variable CHANGER.
Note:
● Assume all the required header files are already being included in the code.
● The function random(n) generates an integer between 0 and n‐1
void main()
{
randomize();
int CHANGER;
CHANGER=random(3);
char CITY[][25]={”DELHI”,”MUMBAI”,”KOLKATA” ,”CHENNAI”};
for(int I=0;I<=CHANGER;I++)
{
for(int J=0;J<=I;J++)
cout<<CITY[J];
cout<<endl;
}
}
(i) (ii)
DELHI DELHI
DELHIMUMABAI DELHIMUMABAI
DELHIMUMABAIKOLKATA DELHIMUMABAIKOLKATA
DELHIMUMABAIKOLKATACHENNAI
(iii) (iv)
MUMABAI KOLKATA
MUMABAIKOLKATA KOLKATACHENNAI
MUMABAIKOLKATACHENNAI
Ans (i)
DELHI
DELHIMUMBAI
DELHIMUMBAIKOLKATA
Page 5 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans PART 1:
Constructor Destructor
A constructor function has same name A destructor function has same name
as the class as the class preceded by ~ symbol
Example:
class Exam
{
int Eno; float Marks;
public:
Exam() //Constructor
{
Eno=1; Marks = 100;
cout<<”Constructor executed...”<<endl;
}
void Show()
{
cout<<Eno<<”#”<<Marks<<endl;
}
~Exam() //Destructor
{
cout<<”Exam Over”<<endl;
}
};
void main()
{
Exam E; //Executes constructor
E.Show();
Page 6 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
} //Executes Destructor
OR
Any other suitable example demonstrating difference between
Constructor and Destructor functions.
PART 2:
Execution of Constructor and Destructor:
Constructor Destructor
A constructor executes by itself at A destructor executes by itself
the time of object creation when the scope of an object
ends
PART 1:
(
1 Mark for correct example of constructor and destructor function)
OR
(
½ Mark each for correct definition of constructor and destructor
function)
PART 2:
(1 Mark for constructor and Destructor execution with/without
example )
(b) Observe the following C++ code and answer the questions (i) and (ii). Assume all
necessary files are included:
class FICTION
{
long FCode;
char FTitle[20];
float FPrice;
public:
FICTION() //Member Function 1
{
cout<<”Bought”<<endl;
FCode=100;strcpy(FTitle,”Noname”);FPrice=50;
}
Page 7 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
FPrice=P;
}
void Increase(float P) //Member Function 3
{
FPrice+=P;
}
void Show() //Member Function 4
{
cout<<FCode<<”:”<<FTitle<<”:”<<FPrice<<endl;
}
~FICTION() //Member Function 5
{
cout<<”Fiction removed!”<<end1;
}
};
void main() //Line 1
{ //Line 2
FICTION F1,F2(101,”Dare”,75); //Line 3
for (int I=0;I<4;I++) //Line 4
{ //Line 5
F1.Increase(20);F2.Increase(15); //Line 6
F1.Show();F2.Show(); //Line 7
} //Line 8
} //Line 9
(i) Which specific concept of object oriented programming out of the following is 1
illustrated by Member Function 1 and Member Function 2 combined together?
● Data Encapsulation
● Data Hiding
● Polymorphism
● Inheritance
Ans Polymorphism
(ii) How many times the message ”Fiction removed!”will be displayed after 1
executing the above C++ code? Out of Line 1 to Line 9, which line is responsible to
display the message
”Fiction removed!”?
Page 8 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans 2 times
Line 9
(c) Write the definition of a class METROPOLIS in C++ with following description: 4
Private Members
Mcode //Data member for Code (an integer)
MName //Data member for Name (a string)
MPop //Data member for Population (a long int)
Area //Data member for Area Coverage (a float)
PopDens //Data member for Population Density (a float)
CalDen() //A member function to calculate
//Density as PopDens/Area
Public Members
Enter() //A function to allow user to enter values of
//Mcode,MName,MPop,Area and call CalDen()
//function
ViewALL()//A function to display all the data members
//also display a message ”Highly Populated Area”
//if the Density is more than 12000
Page 9 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
void METROPOLIS::ViewALL()
{
cout<<Mcode<<MName<<MPop<<Area<<PopDens; //Ignore endl
if(PopDens>12000)
cout<<”Highly Populated Area”; //Ignore endl
}
void METROPOLIS::CalDen()
{
PopDens= PopDens/Area; //ORPopDens = MPop/Area
}
NOTE:
● Deduct ½ Mark if CalDen() is not invoked properly inside Enter()
function
● Marks not to be deducted if any or all the member functions are
defined inside the class
● Marks not to be deducted if Densityis declared as an extra data
member and calculated as Density=PopDens/Area inside
CalDen() function
● Marks not to be deducted if Densityis declared as an extra data
member and checked as if (Density>12000)in lieu of
if (PopDens>12000) inside function
ViewALL()
Page 10 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Note:
No marks to be awarded for any partial answer
(iii) Write the names of all the member functions, which are directly accessible by an
object of class SHOWROOM.
Page 11 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Note:
● No marks to be awarded for any partial answer
● Ignore constructor functions
(iv) What will be the order of execution of the constructors, when an object of class
SHOWROOM is declared?
3 (a) Write the definition of a function FixPay(float Pay[], int N) in C++, which should 2
modify each element of the array Pay having N elements, as per the following
rules:
Existing Value of Pay Pay to be changed to
If less than 100000 Add 25% in the existing value
If >=100000 and <20000 Add 20% in the existing value
If >=200000 Add 15% in the existing value
Page 12 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Note:
● Marks not to be deducted for writing second condition check for
the range as >=100000 && < 200000 instead of >=100000 &&
<
20000
● Marks not to be deducted for incrementing Salary as
Pay[i]+= Pay[i]*20/100; ORPay[i]+= 20/100*Pay[i];
and likewise for all increments
(b) T[20][50] is a two dimensional array, which is stored in the memory along the row 3
with each of its element occupying 4 bytes, find the address of the element
T[15][5], if the element T[10][8] is stored at the memory location 52000.
Ans
Loc(T[I][J])
=BaseAddress + W [( I – LBR)*C + (J – LBC)]
(where
W=size of each element = 4 bytes,
R=Number of Rows=20, C=Number of Columns=50)
Assuming LBR = LBC = 0
LOC(T[10][8])
52000 = BaseAddress + W[ I*C + J]
52000 = BaseAddress + 4[10*50 + 8]
52000 = BaseAddress + 4[500 + 8]
52000 = BaseAddress + 4 x 508
BaseAddress = 52000 2032
= 49968
Page 13 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Page 14 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(d) Write definition for a function SHOWMID(int P[][5],int R,int C) in C++ to display the 3
elements of middle row and middle column from a two dimensional array P having
R number of rows and C number of columns.
For example, if the content of array is as follows:
115 112 116 101 125
103 101 121 102 101
185 109 109 160 172
Page 15 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
cout<<P[I][C/2]<< “ “;
}
OR
void SHOWMID(int P[][5],int R,int C)
{
if(R%2!=0)
{
for (int J=0;J<C;J++)
cout<<P[R/2][J]<< “ “;
}
else
cout<<”No Middle Row”;
cout<<endl;
if(C%2!=0)
{
for (int I=0;I<R;I++)
cout<<P[I][C/2]<< “ “;
}
else
cout<<”No Middle Column”;
}
OR
Any other correct equivalent function definition
Ans A/(B+C)*DE
= (((A / (B+C)) * D) E)
Page 16 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(
(
A A
/ / A
( / A
B / AB
+ /+ AB
C /+ ABC
) / ABC+
) ABC+/
* * ABC+/
D * ABC+/D
) ABC+/D*
ABC+/D*
E ABC+/D*E
) ABC+/D*E
= ABC+/D*E
OR
A/(B+C)*DE
= (A / (B+C) * D E)
Element Stack of Operators Postfix Expression
( (
A ( A
/ (/ A
( (/( A
B (/( AB
+ (/(+ AB
C (/(+ ABC
) (/ ABC+
* (* ABC+/
D (* ABC+/D
( ABC+/D*
E ( ABC+/D*E
) ABC+/D*E
= ABC+/D*E
Page 17 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
Any other method for converting the given infix
expression to its
equivalent postfix expression showing stack contents.
4. (a) Write function definition for WORD4CHAR() in C++ to read the content of a text 2
file FUN.TXT, and display all those words, which has four characters in it.
Example:
If the content of the file fun.TXT is as follows:
When I was a small child, I used to play in the garden
with my grand mom. Those days were amazingly funful
and I remember all the moments of that time
Page 18 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Page 19 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(c) Find the output of the following C++ code considering that the binary file MEM.DAT 1
exists on the hard disk with a data of 1000 members.
class MEMBER
{
int Mcode;char MName[20];
public:
void Register();void Display();
};
void main()
{
fstream MFile;
MFile.open(“MEM.DAT”,ios::binary|ios::in);
MEMBER M;
MFile.read((char*)&M, sizeof(M));
cout<<”Rec:”<<MFile.tellg()/sizeof(M)<<endl;
MFile.read((char*)&M, sizeof(M));
MFile.read((char*)&M, sizeof(M));
cout<<”Rec:”<<MFile.tellg()/sizeof(M)<<endl;
MFile.close();
}
Ans Rec:1
Rec:3
(½ Mark for each correct value of MFile.tellg()/sizeof(M) as 1 and 3
respectively)
SECTION B ‐ (Only for candidates, who opted for Python)
1 (a) Out of the following, find those identifiers, which can not be used for naming 2
Variable or Functions in a Python program:
Page 20 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(d) Find and write the output of the following python code: 2
Numbers=[9,18,27,36]
for Num in Numbers:
for N in range(1, Num%8):
print(N,"#",end=
""
)
print()
Ans
1# () ()
1# (1 # ) (1 # )
2# (1 #) (1 # 2 # )
1# (2 # ) (1 # 2 # 3 # )
2# (1 # )
3# (2 # ) 1#
(3 # ) 1#2#
1#2#3#
Page 21 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans
Python 2.7 output Other Versions output
Page 22 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
import random
PICK=random.randint(0,3)
CITY=["DELHI","MUMBAI","CHENNAI","KOLKATA"];
for I in CITY:
for J in range(1,PICK):
print(I,end="")
print()
(i) (ii)
DELHIDELHI DELHI
MUMBAIMUMBAI DELHIMUMBAI
CHENNAICHENNAI DELHIMUMBAICHENNAI
KOLKATAKOLKATA
(iii) (iv)
DELHI DELHI
MUMBAI MUMBAIMUMBAI
CHENNAI KOLKATAKOLKATAKOLKATA
KOLKATA
OR
2 (a) What is the difference between Multilevel and Multiple inheritance? Give suitable 2
examples to illustrate both.
Ans
Multilevel inheritance Multiple inheritance
Page 23 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
X is the parent class of Y and Y is the The child class Z has parents X and Y
parent class of Z
Ans Output:
Give a Number JAYA
Reenter Number
Give a Number My 3 books
Reenter Number
Give a Number PICK2
Reenter Number
Page 24 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Explanation: The code inside try makes sure that the valid number is entered by
the user. When any input other than an integer is entered, a value error is thrown
and it prompts the user to enter another value.
Methods:
CalDen() # Method to calculate Density as Pop/KM
Record() # Method to allow user to enter values
Code,Name,Pop,KM and call CalDen() method
See() # Method to display all the members also display
a message ”Highly Populated Area”
if the Density is more than 12000.
Page 25 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
NOTE:
Deduct ½ Mark if CalDen() is not invoked properly inside Record()
function
(d) How do we implement abstract method in python? Give an example for the same. 2
Ans Abstract method: An unimplemented method is called an abstract method. When
an abstract method is declared in a base class, the derived class has to either
define the method or raise “NotImplementedError”
class Shape(object):
def findArea(self):
pass
class Square(Shape):
def __init__(self,side):
self.side = side
def findArea(self):
return self.side * self.side
(e) What is the significance of super() method? Give an example for the same. 2
Ans super() function is used to call base class methods which has been extended in
derived class.
EX:
class
GradStudent
(
Student
):
Page 26 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
def
__init__
(
self
):
super
(
GradStudent ,self
).
__init__
()
self
.
subject=
""
self
.
working =
''
def
readGrad
(
self
):
# Call readStudent method of parent class
super
(
GradStudent ,self
).
readStudent()
3. (a) What will be the status of the following list after the First, Second and Third pass 3
of the insertion sort method used for arranging the following elements in
descending order?
22, 24, 64, 34, 80, 43
Note: Show the status of all the elements after each pass very clearly underlining
the changes.
Ans
Page 27 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
class queue:
place = [ ]
def insert(self):
a = raw_input(“Enter place”)
queue.place.append(a)
def delete(self):
if (queue.place == [ ] ):
print(“Queue empty”)
else:
print(“Deleted element is”, queue.place[0])
queue.place.delete()
( ½ mark insert header)
( ½ mark for accepting a value from user)
( ½ mark for adding value in list)
( ½ mark for delete header)
( ½ mark for checking empty list condition)
( ½ mark for displaying “Empty Message”)
(d) Write a method in python to find and display the prime numbers between 2 to N. 3
Pass N as argument to the method.
Ans def prime(N):
for a in range(2,N):
for I in range(2,a):
if N%i ==0:
break
Page 28 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
print a
OR
def prime(N):
for a in range(2,N):
for I in range(2,a):
if a%i ==0:
break
else:
print a
( ½ mark function header) ½ mark for Divisibility check.
( ½ mark first loop) 01 mark for Displaying view.
( ½ mark for second loop)
(e) Evaluate the following postfix notation of expression. Show status of stack after 2
every operation.
22,11,/,14,10,,+,5,
Ans
Element Stack
22 22
11 22, 11
/ 2
14 2, 14
10 2, 14, 10
- 2, 4
+ 6
5 6, 5
- 1
Final Result = 1
(½ Mark for evaluation till each operator)
OR
(1 Mark for only writing the Final answer without showing stack status)
4 (a) Write a statement in Python to perform the following operations: 1
● To open a text file “BOOK.TXT” in read mode
● To open a text file “BOOK.TXT” in write mode
Ans f1 = open(“BOOK.TXT”,’r’)
f2 = open(“BOOK.TXT”, ‘w’)
Page 29 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
class Staff:
def __init__(self,S,SNM):
self.Staffcode=S
self.Name=SNM
def Show(self):
print(self.Staffcode," ",self.Name)
Ans def search():
f = open(“staff.dat”, ‘rb’)
try:
while True:
e = pickle.load(f)
if e.Staffcode == ‘S0105’:
e.Show()
except EOFError:
pass
f.close()
(½ Mark for correct function header)
(½ Mark for opening the file staff.dat correctly)
(½ Mark for correct file check and loop)
Page 30 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
STUDENTS EVENTS
NO NAME EVENTCODE EVENTNAME
1 Tara Mani 1001 Programming
2 Jaya Sarkar 1002 IT Quiz
3 Tarini Trikha
LIST
NO NAME EVENTCODE EVENTNAME
1 Tara Mani 1001 Programming
1 Tara Mani 1002 IT Quiz
2 Jaya Sarkar 1001 Programming
2 Jaya Sarkar 1002 IT Quiz
3 Tarini Trikha 1001 Programming
3 Tarini Trikha 1002 IT Quiz
Degree = 4
Cardinality = 6
Table: VEHICLE
CODE VTYPE PERKM
101 VOLVO BUS 160
Page 31 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
(i) To display NO, NAME, TDATE from the table TRAVEL in descending order of NO.
Page 32 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
SELECT NAME FROM TRAVEL
WHERE CODE IN (‘101’,’102’);
OR
SELECT NAME FROM TRAVEL
WHERE CODE IN (101,102);
(½ Mark for correct )
SELECT
HERE
(½ Mark for correct W )
(iii) To display the NO and NAME of those travellers from the table TRAVEL who
travelled between ‘2015‐12‐31’ and ‘2015‐04‐01’.
Page 33 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans NAME
KM*PERKM
Raveena 3200
(½ Mark for correct output)
6 a. Verify the following using Boolean Laws. 2
A’+ B’.C = A’.B’.C’+ A’.B.C’+ A’.B.C + A’.B’.C+ A.B’.C
Ans LHS
A’ + B’.C
= A’.(B + B’).(C + C’) + (A + A’).B’.C
= A’.B.C + A’.B.C’ + A’.B’.C + A’.B’.C’ + A.B’.C + A’.B’.C
= A’.B.C + A’.B.C’ + A’.B’.C + A’.B’.C’ + A.B’.C
= A’.B’.C’ + A’.B.C’ + A’.B.C + A’.B’.C + A.B’.C
= RHS
OR
RHS = A’.B’.C’ + A’.B.C’ + A’.B.C + A’.B’.C + A.B’.C
= A’.B’.C + A’.B’C’ + A’.B.C + A’.B.C’ + A.B’.C
= A’.B’.(C+C’) + A’.B.(C+C’) + A.B’.C
= A’.B’ + A’.B + A.B’.C
= A’.(B’+B) +A.B’.C
Page 34 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
= A’ + A.B’.C
= (A’ + A).(A’ + B’.C)
= A’ + B’.C = LHS
Ans F(P,Q,R)=(P+Q+R).(P+Q’+R’).(P’+Q+R).(P’+Q+R’)
OR
F(P,Q,R)=
ᵴ
(0,3,4,5)
(1 Mark for the correctly writing the POS form)
Page 35 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
F(X,Y,Z,W)= (2,6,7,8,9,10,11,13,14,15)
Ans
OR
Ans
PAN Examples LAN Examples
Connecting two cell phones to Connecting computers in a school
transfer data
Connecting smartphone to a smart Connecting computers in an office
watch
Note: Any one example of each
OR
Any other one/two correct examples for each of PAN and LAN
Page 36 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Ans
4G 3G
Speed approximately 100 mbps Speed approximately 2 mbps
LTE True mobile broadband Data services with multimedia
OR
Any other two correct advantages of 4G over 3G in terms of speed and
services
( )
½ Mark each for any two correct characteristics
(e) What is the basic difference between Trojan Horse and Computer Worm? 1
Ans
Trojan Horse Computer Worm
It is a "Malware" computer program It is a self‐replicating computer
presented as useful or harmless in program. It uses a network to send
order to induce the user to install and copies of itself to other nodes
run them. (computers on the network) and it
may do so without any user
intervention.
Page 37 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
OR
Any other correct difference between Trojan Horse and Computer Worm
(1 Mark for writing correct difference between Trojan Horse and
Computer Worm)
OR
(½ Mark for writing correct explanation of Trojan Horse)
OR
(½ Mark for writing correct explanation of Computer Worm)
(f) Categories the following under Client side and Server Side script category? 1
(i) VB Sript
(ii) ASP
(iii) JSP
(iv) Java Script
Ans
Client Side Scripts Server Side Scripts
VB Script ASP
Java Script JSP
Page 38 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Note:
● In Villages, there are community centers, in which one room has been
given as training center to this organization to install computers.
● The organization has got financial support from the government and top IT
companies.
(i) Suggest the most appropriate location of the SERVER in the B_HUB (out of the 4 1
locations), to get the best and effective connectivity. Justify your answer.
Ans B_TOWN. Since it has the maximum number of computers and is closest to all
other locations.
Page 39 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
Page 40 of 40
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
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
● All programming questions have to be answered with respect to C++/Python
Language only
● In C++/Python , ignore case sensitivity for identifiers (Variable / Functions /
Structures / Class Names)
● In Python indentation is mandatory, however, number of spaces used for
indenting may vary
● In SQL related questions – both ways of text/character entries should be
acceptable 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 SQL
statements
● In SQL related questions, ignore case sensitivity.
Page 1 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Note: Assume all required header files are already being included in the program.
Page 2 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
T[C+1]=CT;
}
for (C=1;C<L;C+=2)
if (T[C]>=’M’ && T[C]<=’U’)
T[C]=’@’;
}
void main()
{
TEXT Str=”HARMONIOUS”;
JumbleUp(Str);
cout<<Str<<endl;
}
Ans AHM@N@OIS@
Page 3 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
void main()
{
Share S,T,U;
S.GetCode(1324,350);
T.GetCode(1435,250);
S.Update(50,28);
U.Update(25,26);
S.Status();
T.Status();
U.Status();
}
Ans Date:28
1324#400
Date:1
1435#250
Date:26
1000#75
Page 4 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans
(ii) (iv)
BLUE BLUE
BLUEPINK BLUEPINK
BLUEPINKGREEN BLUEPINKGREEN
BLUEPINKGREENRED
Example of Encapsulation
class student
{
int rno;
char name[20];
public:
void input()
{
cin>>rno;
gets(name);
}
Page 5 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
void output()
{
cout<<rno<<” “<<name<<endl;
}
};
OR
Any other suitable example demonstrating a characteristic of Object
Oriented Programming.
(
1 Mark for correct names of 4 characteristics of OOP)
OR
(½ Mark for correct names of any 2 characteristics of OOP)
(
1 Mark for correct example of 1 characteristic)
(b) Observe the following C++ code and answer the questions (i) and (ii). Assume all
necessary files are included:
class BOOK
{
long Code ;
char Title[20];
float Price;
public:
BOOK() //Member Function 1
{
cout<<”Bought”<<endl;
Code=10;strcpy(Title,”NoTitle”);Price=100;
}
BOOK(int C,char T[],float P) //Member Function 2
{
Code=C;
strcpy(Title,T);
Price=P;
}
void Update(float P) //Member Function 3
{
Price+=P;
}
Page 6 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Page 7 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(c) Write the definition of a class CITY in C++ with following description: 4
Private Members
Ccode //Data member for City Code (an integer)
CName //Data member for City Name (a string)
Pop //Data member for Population (a long int)
KM //Data member for Area Coverage (a float)
Density //Data member for Population Density (a float)
DenCal() //A member function to calculate
//Density as Pop/KM
Public Members
Record() //A function to allow user to enter values of
//Acode,Name,Pop,KM and call DenCal() function
View() //A function to display all the data members
//also display a message ”Highly Populated City”
//if the Density is more than 10000
Ans class CITY
{
int Ccode;
char CName[20];
long int Pop;
float KM;
float Density;
void DenCal();
public:
void Record();
void View();
};
void CITY::Record()
{
cin>>Ccode;
gets(CName); //ORcin>>CName;
cin>>Pop;
cin>>KM;
DenCal();
}
void CITY::View()
{
Page 8 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Page 9 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Note:
No marks to be awarded for any partial answer
(iii) Write the names of all the member functions, which are directly accessible by an
object of class SALEPOINT.
Ans EnterAll(), ViewAll(), Enter(), View()
(1 Mark for correct answer)
Page 10 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
3 (a) Write the definition of a function FixSalary(float Salary[], int N) in C++, which 2
should modify each element of the array Salary having N elements, as per the
following rules:
Existing Salary Values Required Modification in Value
If less than 100000 Add 35% in the existing value
If >=100000 and <20000 Add 30% in the existing value
If >=200000 Add 20% in the existing value
Ans
void FixSalary(float Salary[ ], int N)
{
for (int i=0;i<N;i++)
if(Salary[i]<100000)
Salary[i]+= 0.35 *Salary[i];
else if (Salary[i]>=100000 && Salary[i]<20000)
Salary[i]+= 0.3 * Salary[i];
else if(Salary[i]>=200000)
Salary[i]+= 0.20 * Salary[i];
}
OR
Any other correct equivalent function definition
Note:
● Marks not to be deducted for writing second condition check for
the range as >=100000 && < instead of >=100000 &&
200000
<
20000
● Marks not to be deducted for incrementing Salary as
Salary[i]+=Salary[i]*20/100; OR
Salary[i]+=20/100*Salary[i];
and likewise for all increments
(b) R[10][50] is a two dimensional array, which is stored in the memory along the row 3
with each of its element occupying 8 bytes, find the address of the element
R[5][15], if the element R[8][10] is stored at the memory location 45000.
Page 11 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans
Loc(R[I][J])
=BaseAddress + W [( I – LBR)*C + (J – LBC)]
(where
W=size of each element = 8 bytes,
R=Number of Rows=10, C=Number of Columns=50)
Assuming LBR = LBC = 0
LOC(R[8][10])
45000 = BaseAddress + W[ I*C + J]
45000 = BaseAddress + 8[8*50 + 10]
45000 = BaseAddress + 8[400 + 10]
45000 = BaseAddress + 8 x 410
BaseAddress = 45000 3280
= 41720
Page 12 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(c) Write the definition of a member function DELETE() for a class QUEUE in C++, to 4
remove a product from a dynamically allocated Queue of products considering the
following code is already written as a part of the program.
struct PRODUCT
{
int PID; char PNAME[20];
PRODUCT *Next;
};
class QUEUE
{
PRODUCT *R,*F;
public:
QUEUE(){R=NULL;F=NULL;}
void INSERT();
void DELETE();
~QUEUE();
};
Ans void QUEUE::DELETE()
{
if( F!=NULL)
{
PRODUCT *T = F;
cout<<T>PID<<T>PNAME;
F=F>Next;
delete T;
if(F==NULL)
{
R=NULL;
}
}
else
cout<<”Queue Empty”;
}
( ½ Mark for checking empty queue)
( ½ Mark for assigning front to temporary pointer)
( 1 Mark for reassigning front)
( 1 Mark for deleting previous front using temporary pointer)
( ½ Mark for checking emptied queue after deletion)
( ½ Mark for assigning rear to NULL if queue was emptied after
deletion)
Page 13 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(d) Write definition for a function DISPMID(int A[][5],int R,int C) in C++ to display the 3
elements of middle row and middle column from a two dimensional array A having
R number of rows and C number of columns.
For example, if the content of array is as follows:
215 912 516 401 515
103 901 921 802 601
285 209 609 360 172
OR
void DISPMID(int A[][5],int R,int C)
{
if(R%2!=0)
{
for (int J=0;J<C;J++)
cout<<A[R/2][J]<< “ “;
}
else
cout<<”No Middle Row”;
cout<<endl;
if(C%2!=0)
{
for (int I=0;I<R;I++)
cout<<A[I][C/2]<< “ “;
}
Page 14 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
else
cout<<”No Middle Column”;
}
OR
Any other correct equivalent function definition
Page 15 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(
P P
/ /
(
Q PQ
/
R PQR
) / PQR
) PQR/
* *
S PQR/S
) PQR/S*
+ +
T PQR/S*T
) PQR/S*T+
= PQR/S*T+
OR
Any other method for converting the given infix
expression to its
equivalent postfix expression showing stack contents.
Page 16 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Note:
No marks to be deducted if words with length 4 and including a ‘.’ is also
checked
(b) Write a definition for function ONOFFER( ) in C++ to read each object of a binary 3
file TOYS.DAT, find and display details of those toys, which has status as “ÖN
OFFER”. Assume that the file TOYS.DAT is created with the help of objects of class
TOYS, which is defined below:
class TOYS
{
int TID;char Toy[20],Status[20]; float MRP;
public:
void Getinstock()
{
cin>>TID;gets(Toy);gets(Status);cin>>MRP;
}
void View()
{
cout<<TID<<”:”<<Toy<<”:”<<MRP<<””:”<<Status<<endl;
}
char *SeeOffer(){return Status;}.
Page 17 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
};
Ans void ONOFFER()
{
TOYS T;
ifstream fin;
fin.open(“TOYS.DAT”, ios::binary);
while(fin.read((char*)&T, sizeof(T)))
{
if(strcmp(T.SeeOffer(),”ON OFFER”)==0)
T.View();
}
fin.close(); //Ignore
}
OR
Any other correct function definition
Page 18 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans Rec:1
Rec:3
Page 19 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Values=[10,20,30,40]
for Val in Values:
for I in range(1, Val%9):
print(I,"*",end=
""
)
print()
Ans
1* () ()
1* (1, * ) (1 * )
2* () (1 * 2 * )
1* (1 ,* ) (1 * 2 * 3 * )
2* (2 ,* )
3* () 1*
(1, * ) 1*2*
(2, * ) 1*2*3*
(3, * )
()
Page 20 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
t.Assign(15,"Easy ")
u.Assign(25,"Made Easy")
s.ShowVal()
t.ShowVal()
u.ShowVal()
Ans
Python 2.7 output Other Versions output
OR
Page 21 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
2 (a) What is the difference between Multilevel and Multiple inheritance? Give suitable 2
examples to illustrate both.
Ans
Multilevel inheritance Multiple inheritance
X is the parent class of Y and Y is the The child class Z has parents X and Y
parent class of Z
Page 22 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
print(“Reenter an integer”)
print(Start)
Ans Output:
Enter Number AMAR
Reenter an integer
Enter Number THREE
Reenter an integer
Enter Number A123
Reenter an integer
Enter Number 1200
6
Explanation: The code inside try makes sure that the valid number is entered by
the user. When any input other than an integer is entered, a value error is thrown
and it prompts the user to enter another value.
Methods:
DenCal() # Method to calculate Density as Pop/KM
Record() # Method to allow user to enter values
Ccode,CName,Pop,KM and call DenCal() method
View() # Method to display all the members
also display a message ”Highly Populated City”
if the Density is more than 10000.
Page 23 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
self.Density=0
def DenCal(self):
self.Density = self.Pop / self.KM
def Record(self):
self.Ccode = input(“Enter CCode”)
self.CName = raw_input(“Enter CName”)
self.Pop = input(“Enter population”)
self.KM = input(“Enter KM”)
DenCal(self) // or self.DenCal()
def View(self):
print CCode,CName,Pop, KM, Density
if self.Density > 10000:
print(“Highly populated city”)
# OR print(“Highly populated city”)
NOTE:
Deduct ½ Mark if DenCal() is not invoked properly inside Record()
function
(d) How do we implement abstract method in python? Give an example for the same. 2
class Shape(object):
def findArea(self):
pass
class Square(Shape):
def __init__(self,side):
self.side = side
def findArea(self):
return self.side * self.side
Page 24 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(e) What is the significance of super() method? Give an example for the same. 2
Ans super() function is used to call base class methods which has been extended in
derived class.
EX:
class
GradStudent(Student):
def
__init__(self):
super(GradStudent,
self).__init__()
self.subject
=
""
self.working
=
""
def
readGrad
(self):
# Call readStudent method of parent class
super(GradStudent,
self).readStudent()
3. (a) What will be the status of the following list after the First, Second and Third pass 3
of the selection sort method used for arranging the following elements in
descending order?
Note: Show the status of all the elements after each pass very clearly underlining
the changes.
12, 14, 54, 64, 90, 24
Ans
Page 25 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
OR
class queue:
city = [ ]
def Insert(self):
a = raw_input(“Enter city”)
queue.a.append(a)
def Delete(self):
if (queue.city == [ ] ):
print(“Queue empty”)
else:
Page 26 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(e) Evaluate the following postfix notation of expression. Show status of stack after 2
every operation.
12,2,/,34,20,,+,5,+
Page 27 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans
Element Stack
12 12
2 12, 2
/ 6
34 6, 34
20 6, 34, 20
6, 14
+ 20
5 20, 5
+ 25
Final Result = 25
(½ Mark for evaluation till each operator)
OR
(1 Mark for only writing the Final answer without showing stack status)
4 (a) Write a statement in Python to perform the following operations: 1
● To open a text file “MYPET.TXT” in write mode
● To open a text file “MYPET.TXT” in read mode
Ans ● f1 = open(“MYPET.TXT”,’w’)
f2 = open(“MYPET.TXT”, ‘r’)
Page 28 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(c) Consider the following definition of class Employee, write a method in python to 3
search and display the content in a pickled file emp.dat, where Empno is matching
with ‘A0005’.
class Employee:
def __init__(self,E,NM):
self.Empno=E
self.EName=NM
def Display(self):
print(self.Empno," ",self.EName)
PARTICIPANTS EVENTS
PNO NAME EVENTCODE EVENTNAME
1 Aruanabha Tariban 1001 IT Quiz
2 John Fedricks 1002 Group Debate
3 Kanti Desai
Page 29 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
RESULT
PNO NAME EVENTCODE EVENTNAME
1 Aruanabha Tariban 1001 IT Quiz
1 Aruanabha Tariban 1002 Group Debate
2 John Fedricks 1001 IT Quiz
2 John Fedricks 1002 Group Debate
3 Kanti Desai 1001 IT Quiz
3 Kanti Desai 1002 Group Debate
Table: VEHICLE
VCODE VEHICLETYPE PERKM
V01 VOLVO BUS 150
V02 AC DELUXE BUS 125
V03 ORDINARY BUS 80
V05 SUV 30
V04 CAR 18
Note: PERKM is Freight Charges per kilometer
Table: TRAVEL
CNO CNAME TRAVELDATE KM VCODE NOP
101 K.Niwal 20151213 200 V01 32
103 Fredrick Sym 20160321 120 V03 45
105 Hitesh Jain 20160423 450 V02 42
102 Ravi Anish 20160113 80 V02 40
107 John Malina 20150210 65 V04 2
104 Sahanubhuti 20160128 90 V05 4
106 Ramesh Jaya 20160406 100 V01 25
Note:
● Km is Kilometers travelled
● NOP is number of passengers travelled in vehicle
Page 30 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(i) To display CNO, CNAME, TRAVELDATE from the table TRAVEL in descending order
of CNO.
Page 31 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans LHS
X’ + Y’.Z
= X’.(Y + Y’).(Z + Z’) + (X + X’).Y’.Z
Page 32 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
A B C G(A,B,C)
0 0 0 1
0 0 1 0
Page 33 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
OR
Page 34 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans Speed ‐
● Faster web browsing
● Faster file transfer
Service ‐
● Better video clarity
● Better security
OR
(Any other correct advantage can be considered)
(½ Mark for each of any one point for Speed/Service)
(d) Write two characteristics of Web 2.0. 1
Ans ● Makes web more interactive through online social medias
● Supports easy online information exchange
● Interoperability on the internet
● Video sharing possible in the websites
Page 35 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
OR
Any two of the above or any other two correct characteristics of Web 2.0
(½ Mark each for any two correct answers)
(e) What is the basic difference between Computer Worm and Trojan Horse? 1
Ans
Trojan Horse Computer Worm
OR
Any other correct difference between Trojan Horse and Computer Worm
(f) Categories the following under Client side and Server Side script category? 1
(i) Java Script
(ii) ASP
(iii) VB Sript
(iv) JSP
Ans
Client Side Scripts Server Side Scripts
VB Script ASP
Java Script JSP
Page 36 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
follows.
As a network consultant, you have to suggest the best network related solutions
for their issues/problems raised in (i) to (iv), keeping in mind the distances
between various locations and other given parameters.
Note:
In Villages, there are community centers, in which one room has been given as
training center to this organization to install computers.
The organization has got financial support from the government and top IT
companies.
(i) Suggest the most appropriate location of the SERVER in the YHUB (out of the 4 1
locations), to get the best and effective connectivity. Justify your answer.
Ans YTOWN
Page 37 of 38
CBSE AISSCE 2015‐2016 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Justification
● Since it has the maximum number of computers.
● It is closest to all other locations.
(½ Mark for correct answer)
(½ Mark for any one correct justification)
(ii) Suggest the best wired medium and draw the cable layout (location to location) to 1
efficiently connect various locations within the YHUB.
Ans Optical Fiber
Page 38 of 38
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
General Instructions:
● The answers given in the marking scheme are SUGGESTIVE, Examiners are
requested to award marks for all alternative correct solutions/answers
conveying similar meaning.
● All programming questions have to be answered with respect to C++
Language for Section A and Python for Section B (All presently supported
versions of compilers/interpreters should be considered).
● In C++/Python, ignore case sensitivity for identifiers (Variable / Functions
/ Structures / Class Names)
unless explicitly specified in question
.
● In SQL related questions :
○ Both ways of text/character entries should be acceptable. For
example: “AMAR” and ‘amar’ both are acceptable.
○ 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.
○ Semicolon should be ignored for terminating the SQL statements.
○ Ignore case sensitivity for commands.
○ Ignore headers in output questions.
Section ‐ A
(Only for C++ candidates)
1 (a) Find the correct identifiers out of the following, which can be 2
used for naming Variable, Constants or Functions in a C++
program:
For, while, INT, NeW, delete, 1stName, Add+Subtract, name1
(b) Observe the following program very carefully and write the name 1
of those header file (s), which are essentially needed to compile
and execute the following program successfully:
Page 1 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
if (isalpha(Txt[Count]))
Txt[Count++]='@' ;
else
Txt[Count++]='#' ;
puts (Txt) ;
}
(c) Observe the following C++ code very carefully and rewrite it 2
after removing any/all syntactical errors with each correction
underlined.
Note: Assume all required header files are already being included
in the program.
Ans #define
floatMaxSpeed ; //Error 1,2,3
60.5
void main()
{
int MySpeed ; //Error 4
char Alert='N';
cin>>MySpeed;
if
(MySpeed>MaxSpeed) //Error 5
Alert=’Y’;
cout<<Alert<<endl; //Error 6
}
Page 2 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans 10, 8
20, 8
Page 3 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
void main()
{
Eval E;
E.Sink(3);
E.Show();
E.Float(7);
E.Show();
E.Sink(2);
E.Show();
}
Ans B#0
I#1
G#1
(1 Mark for each correct line of output)
Note:
● Deduct ½ Mark for not considering any or all endl(s) at
proper place(s)
● Deduct ½ Mark for not writing any or all # symbol(s)
(f) Study the following program and select the possible output(s) 2
from the option (i) to (iv) following it. Also, write the maximum
and the minimum values that can be assigned to the variable
VAL.
Note:
‐Assume all required header files are already being included in
the program.
‐random(n) function generates an integer between 0 and n‐1.
void main()
{
randomize();
int VAL;
VAL=random(3)+2;
char GUESS[]="ABCDEFGHIJK";
for (int I=l;I<=VAL;I++)
{
for(int J=VAL;J<=7;J++)
cout«GUESS[J];
cout«endl;
}
}
Page 4 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
void main()
{
Point p1;
Point p2(p1);//Copy constructor is called here
//OR
Point p3=p1;//Copy constructor is called here
}
Page 5 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(b) Observe the following C++ code and answer the questions (i) and
(ii) :
class Passenger
{
long PNR;
char Name [20] ;
public:
Passenger() //Function 1
{ cout<<"Ready"<<endl; }
~Passenger() //Function 4
{ cout<<"Booking cancelled!"<<endl; }
};
Ans Function 4
OR
~Passenger()
It is a Destructor function.
Page 6 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Page 7 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
FixExhibit();
}
void Photo:: ViewAll()
{
cout<<Pno<<Category<<Exhibit<<endl;
}
Page 8 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
public:
Billing();
void Bill();
void BillPrint();
};
(ii) Write the names of all the data members, which are directly
accessible from the member functions of class Painting.
Page 9 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9]
100 43 20 56 32 91 80 40 45 21
After executing the function, the array content should be
changed as follows:
P[0] P[1] P[2] P[3] P[4] P[5] P[6] P[7] P[8] P[9]
10 1 10 1 1 1 10 10 1 1
OR
Any other correct equivalent function definition
Page 10 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
= 14180 + 2440
= 16620
OR
LOC(ARR[30][10])
= LOC(ARR[10][5])+ W[( ILBR)*C + (JLBC)]
= 15000 + 4[(3010)*20 + (105)]
= 15000 + 4[ 20*20 + 5]
= 15000 + 4 *405
= 15000 + 1620
= 16620
OR
Where C is the number of columns and LBR=LBC=1
LOC(ARR[10][5])
15000 = BaseAddress + W [( I1)*C + (J1)]
= BaseAddress + 4[9*20 + 4]
= BaseAddress + 4[180 + 4]
= BaseAddress + 4 * 184
= BaseAddress + 736
BaseAddress = 15000 736
= 14264
LOC(ARR[30][10])
= 14264 + 4[(301)*20 + (101)]
= 14264 + 4[29*20 + 9]
= 14264 + 4[580 + 9]
= 14264 + 4*589
= 14264 + 2356
= 16620
Page 11 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
void POP();
~STACK();
};
Page 12 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
int T = P[I][J];
P[I][J] = P[I][MJ1];
P[I][MJ1] = T;
}
}
for(I=0; I<N; I++)
{
for(int J=0; J<M; J++)
cout<<P[I][J];
cout<<endl;
}
}
Ans U * V + R/ (ST)
= ((U * V)+(R/(ST)))
Element Stack Postfix
(
(
U U
* *
V UV
) UV*
+ +
(
R UV*R
/ +/
(
S UV*RS
+/
T UV*RST
) UV*RST
) UV*RST/
) UV*RST/+
Page 13 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
OR
Element Stack Postfix
U U
* * U
V * UV
+ + UV*
R + UV*R
/ +/ UV*R
( +/( UV*R
S +/( UV*RS
+/( UV*RS
T +/( UV*RST
) +/ UV*RST
+ UV*RST/
UV*RST/+
OR
Any other method for converting the given Infix expression to its
equivalent Postfix expression showing stack contents
4 (a) Write function definition for TOWER() in C++ to read the content
of a text file WRITEUP.TXT, count the presence of word TOWER
and display the number of occurrences of this word. 2
Note :
‐ The word TOWER should be an independent word
‐ Ignore type cases (i.e. lower/upper case)
Example:
If the content of the file WRITEUP.TXT is as follows:
Page 14 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
while (!f.eof())
{
f>>s;
if (strcmpi(s,”TOWER”)==0)
count++;
}
cout<<count;
f.close();
}
OR
Any other correct function definition
NOTE:
(½ Mark to be deducted if TOWER is compared without ignoring
the case)
class GIFTS
{
int CODE;char ITEM[20]; float PRICE;
public:
void Procure()
{
cin>>CODE; gets(ITEM);cin>>PRICE;
}
void View()
{
cout<<CODE<<":"<<ITEM<<":"<<PRICE<<endl;
}
float GetPrice() {return PRICE;}
};
Page 15 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
{
if(G.GetPrice()>2000)
G.View();
}
fin.close();
}
OR
Any other correct equivalent function definition
(½
Mark for opening GIFTS.DAT correctly)
(1 Mark for reading all records from the file)
(1 Mark for checking value of PRICE > 2000 )
(½ Mark for displaying the desired items)
(c) Find the output of the following C++ code considering that the
binary file MEMBER.DAT exists on the hard disk with records of
100 members: 1
class MEMBER
{
int Mno; char Name[20];
public:
void In();void Out();
};
void main()
{
fstream MF;
MF.open("MEMBER.DAT”,ios::binary|ios::in);
MEMBER M;
MF.read((char*)&M,sizeof(M));
MF.read((char*)&M,sizeof(M));
MF.read((char*)&M,sizeof(M));
int POSITION=MF.tellg()/sizeof(M);
cout<<"PRESENT RECORD:"<<POSITION<<endl;
MF.close();
}
Page 16 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Section ‐ B
(Only for Python candidates)
1 (a) How is __init( ) __different from __del ( )__ ? 2
For Example:
class Sample:
def __init__(self):
self.data = 79
print('Data:',self.data,'created')
def __del__(self):
print('Data:',self.data,'deleted')
s = Sample()
del s
Ans isalpha()
len()
(c) Rewrite the following code in python after removing all syntax
error(s). Underline each correction done in the code. 2
Page 17 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
print Sum[5]
print Sum
(2)#Function Call #Error 4
print Sum
(5) #Error 4
(d) Find and write the output of the following python code : 2
for Name in ['John','Garima','Seema','Karan']:
print Name
if Name[0]== 'S':
break
else :
print 'Completed!'
print 'Weldone!'
Ans John
Garima
Seema
Weldone!
(½ Mark for each correct line)
Note:
Deduct ½ Mark for not considering any or all line breaks at
proper place(s)
(e) Find and write the output of the following python code: 3
class Emp:
def __init__(self,code,nm): #constructor
self.Code=code
self.Name=nm
def Manip (self) :
self.Code=self.Code+10
self.Name='Karan'
def Show(self,line):
print self.Code,self.Name,line
s=Emp(25,'Mamta')
Page 18 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
s.Show(1)
s.Manip()
s.Show(2)
print s.Code+len(s.Name)
Ans 25 Mamta 1
35 Karan 2
40
(1 Mark for each correct line)
Note:
Deduct ½ Mark for not considering any or all line break(s) at
proper place(s).
(f) What are the possible outcome(s) executed from the following 2
code? Also specify the maximum and minimum values that can be
assigned to variable COUNT.
TEXT="CBSEONLINE"
COUNT=random.randint(0,3)
C=9
while TEXT[C]!='L':
print TEXT[C]+TEXT[COUNT]+'*',
COUNT=COUNT+1
C=C1
(i) (ii) (iii) (iv)
EC*NB*IS* NS*IE*LO* ES*NE*IO* LE*NO*ON*
Ans (i) EC*NB*IS*
(iii) ES*NE*IO*
Minimum COUNT = 0 Maximum COUNT = 3
2 (a) Illustrate the concept inheritance with the help of a python code 2
Page 19 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
class Der(Base):
def __init__(self):
print "Derived Constructor at work..."
def display(self):
print "Hello from Derived"
(b) What will be the output of the following python code ? Explain 2
the try and except used in the code.
A=0
B=6
print 'One'
try:
print 'Two'
X=B/A
Print 'Three'
except ZeroDivisionError:
print B*2
print 'Four'
except:
print B*3
print 'Five'
ANS One
Two
12
Four
The code written within try triggers the exception written after
except ZeroDivisionError: in case there is a division by zero error
otherwise the default exception is executed
OR
Any other correct explanation for usage of try and except
Page 20 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Page 21 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
3 (a) What will be the status of the following list after fourth pass of 3
bubble sort and fourth pass of selection sort used for arranging
the following elements in descending order ?
34,6,12,3,45,25
Page 22 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
i. 34,12,3,45,25,6
ii. 34,12,45,25,3,6
iii. 34,45,25,12,3,6
iv. 45,34,25,12,3,6
Selection Sort
34,6,12,3,45,25 (Original Content)
i. 45,6,12,3,34,25
ii. 45,34,12,3,6,25
iii. 45,34,25,3,6,12
iv. 45,34,25,12,6,3 (Unsorted status
after 4th pass)
Page 23 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(c) Write PUSH (Names) and POP (Names) methods in python to add
Names and Remove names considering them to act as Push and
Pop operations of Stack. 4
def pop():
if Stack == []:
print('Stack is empty!')
else:
print('Deleted element is',Stack.pop())
Ans
Element Stack
34 34
23 34, 23
Page 24 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
+ 57
4 57, 4
5 57, 4, 5
* 57, 20
37
Ans (i) diary.txt is opened for writing data at the end of file
(ii) diary.txt is opened for writing data from the beginning of file
in create mode
(b) Write a method in python to read the content from a text file
story.txt line by line and display the same on screen. 2
Page 25 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
def show(self):
print(self.Admno,"#",self.Name)
def store_data(self):
piFile = open('student.dat','wb')
pickle.dump(self, piFile)
piFile.close()
Section ‐ C
(For all candidates)
5 (a) Observe the following table carefully and write the names of the
most appropriate columns, which can be considered as
(i) candidate keys and (ii) primary key. 2
(b) Consider the following DEPT and EMPLOYEE tables. Write SQL 6
queries for to
( i) and find outputs for SQL queries
( iv) to
( v) ( viii).
Table: DEPT
Page 26 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Table: EMPLOYEE
ENO NAME DOJ DOB GENDER DCODE
1001 George K 20130902 19910901 MALE D01
1002 Ryma Sen 20121211 19901215 FEMALE D03
1003 Mohitesh 20130203 19870904 MALE D05
1007 Anil Jha 20140117 19841019 MALE D04
1004 Manila Sahai 20121209 19861114 FEMALE D01
1005 R SAHAY 20131118 19870331 MALE D02
1006 Jaya Priya 20140609 19850623 FEMALE D05
Note: DOJ refers to date of joining and DOB refers to date of
Birth of employees.
Ans SELECT
Eno,Name,Gender FROM Employee
ORDER BY Eno;
(½ Mark for )
SELECT Eno,Name,Gender FROM Employee
(½ Mark for )
ORDER BY Eno
(ii) To display the Name of all the MALE employees from the table
EMPLOYEE.
(iii) To display the Eno and Name of those employees from the
table EMPLOYEE who are born between '1987‐01‐01' and
'1991‐12‐01'.
(½ Mark for )
SELECT Eno,Name FROM Employee
(½ Mark for
Page 27 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(v)
SELECT COUNT(*),DCODE FROM EMPLOYEE
GROUP BY DCODE HAVING COUNT(*)>1;
(vi)
SELECT DISTINCT DEPARTMENT FROM DEPT;
Ans Department
INFRASTRUCTURE
MARKETING
MEDIA
FINANCE
HUMAN RESOURCE
(viii)
SELECT MAX(DOJ), MIN(DOB) FROM EMPLOYEE;
Page 28 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans L.H.S
=U’+ V
=U’.(V+V’)+ V.(U’+ U)
=U’.V + U’.V’ + U’.V + U.V
=U’.V+U’.V’+U.V
=R.H.S
OR
R.H.S
=U’V’+U’.V +U.V
=U’.(V’+ V)+ U.V
=U’.1 + U.V
=U’+ U.V
=U’+ V
=L.H.S
(b) Draw the Logic Circuit for the following Boolean Expression : 2
(X’+Y).Z+W’
Ans
P Q R F(P,Q,R)
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
Page 29 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
1 0 1 0
1 1 0 0
1 1 1 1
Ans
OR
Page 30 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Star Topology
(b) What kind of data gets stored in cookies and how is it useful? 1
Ans Packet Switching follows store and forward principle for fixed packets.
Fixes an upper limit for packet size.
(d) Out of the following, which is the fastest (i) wired and (ii) 1
wireless medium of communication?
Infrared, Coaxial Cable, Ethernet Cable, Microwave, Optical Fiber
½
( Mark each for Wired and Wireless
medium of
communication
)
Page 31 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
Ans A Trojan Horse is a code hidden in a program, that looks safe but
has hidden side effects typically causing loss or theft of data, and
possible system harm.
(f) Out of the following, which all comes under cyber crime? 1
(i) Stealing away a brand new hard disk from a showroom.
(ii) Getting in someone's social networking account without
his consent and posting on his behalf.
(iii) Secretly copying data from server of a organization and
selling it to the other organization.
(iv) Looking at online activities of a friends blog.
Page 32 of 33
CBSE AISSCE 2015 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91 Outside Delhi)
(i) Suggest the most appropriate location of the server inside the 1
HYDERABAD campus (out of the 4 buildings), to get the best
connectivity for maximum no. of computers. Justify your
answer.
Ans ADMIN
(due to maximum number of computers)
OR
ARTS(due to shorter distance from the other buildings)
Page 33 of 33
Class XII
Marking Scheme
SECTION A
1 False 1 mark for 1
correct
answer
[1]
ceieP0
BLACK*
[2]
18 Option b 1 mark for 1
correct
Both A and R are true but R is not the correct explanation for A answer
SECTION B
19 (i) ½ mark for 1+1=2
each correct
POP3 – Post Office Protocol 3 expansion
(ii)
(i) Bandwidth is the maximum rate of data transfer over 1 mark for
correct
a given transmission medium. / The amount of definition
information that can be transmitted over a network.
[3]
(ii) https (Hyper Text Transfer Protocol Secure) is the 1 mark for
correct
protocol that uses SSL (Secure Socket Layer) to
difference.
encrypt data being transmitted over the Internet.
Therefore, https helps in secure browsing while http
does not.
21 ½ mark for 2
correct
function
header
½ mark for
correct loop
½ mark for
correct if
statement
½ mark for
displaying
OR
the output
½ mark for
correct
function
header
½ mark for
using split()
[4]
½ mark for
adding to
tuple
½ mark for
return
statement
OR
import statistics
1 mark for
print( statistics.mode(studentAge) )
correct
import
statement
1 mark for
correct
command
with mode()
and print()
[5]
As the primary key is added as the last field, the command for
inserting data will be: 1 mark for
correct
INSERT INTO Employee INSERT
VALUES("Shweta","Production",26900,999); command
Alternative answer:
INSERT INTO
Employee(EmpId,Ename,Department,Salary)
VALUES(999,"Shweta","Production",26900);
OR
To delete the attribute, category:
1 mark for
ALTER TABLE Sports correct
DROP category; ALTER TABLE
command
with DROP
To add the attribute, TypeSport
1 mark for
correct
ALTER TABLE Sports ALTER TABLE
command
ADD TypeSport char(10) NOT NULL; with ADD
SECTION C
26 ND-*34 ½ mark for 3
each correct
character
27
[6]
4
(ii)
CNAME SPORTS
AMINA CHESS
(iii)
CNAME AGE PAY
AMRIT 28 1000
VIRAT 35 1050
28 1 mark for 3
correctly
opening and
closing files
½ mark for
correctly
reading data
1 mark for
correct loop
and if
statement
OR
½ mark for
displaying
data
1 mark for
correctly
opening and
closing the
files
[7]
½ mark for
correctly
reading data
1 mark for
correct loop
and if
statement
½ mark for
displaying
the output.
(ii)
SELECT Name, Salary + Allowance AS
"Total Salary" FROM Personal;
(iii)
DELETE FROM Personal
WHERE Salary>25000
[8]
30 1 ½ marks for 3
each function
SECTION D
31 (i) 1 mark for 1*4=4
each correct
SELECT PName, BName FROM PRODUCT P,
query
BRAND B WHERE P.BID=B.BID;
(ii)
DESC PRODUCT;
(iii)
SELECT BName, AVG(Rating) FROM PRODUCT
P, BRAND B
WHERE P.BID=B.BID
GROUP BY BName
HAVING BName='Medimix' OR
BName='Dove';
(iv)
SELECT PName, UPrice, Rating
FROM PRODUCT
ORDER BY Rating DESC;
[9]
32 ½ mark for 4
accepting
data
correctly
½ mark for
opening and
closing file
½ mark for
writing
headings
½ mark for
writing row
½ mark for
opening and
closing file
½ mark for
reader object
½ mark for
print heading
½ mark for
printing data
SECTION E
33 a) 1 mark for 1*5=5
each correct
Bus Topology
answer
ENGINEERING
Admin
BUSINESS
MEDIA
[10]
b) Switch
c) Admin block, as it has maximum number of computers.
d) Microwave
e) No, a repeater is not required in the given cable layout as the
length of transmission medium between any two blocks does not
exceed 70 m.
½ mark for
correct try
and except
block
½ mark for
correct loop
1 mark for
correctly
copying data
[11]
½ mark for
correct
return
statement
½ mark for
correctly
opening and
closing files
½ mark for
correct try
and except
block
½ mark for
correct loop
½ mark for
OR correct if
(i) Text files: statement
Binary Files
Extension is .dat
Data is stored in binary form (0s and 1s), that is not
human readable.
(ii)
[12]
Note: Any other correct logic may be marked
35 (i) Domain is a set of values from which an attribute can ½ mark for 1+4=5
correct
take value in each row. For example, roll no field can
definition
have only integer values and so its domain is a set of
½ mark for
integer values correct
example
(ii)
½ mark for
importing
correct
module
1 mark for
correct
connect()
½ mark for
correctly
accepting the
input
Note: Any other correct logic may be marked
1 ½ mark for
correctly
[13]
executing the
query
½ mark for
correctly
using
OR commit()
½ mark for
importing
correct
module
1 mark for
correct
connect()
1 mark for
correctly
executing
the query
½ mark for
correctly
using
fetchall()
1 mark for
correctly
[14]
displaying
data
[15]