0% found this document useful (0 votes)
110 views10 pages

Sample Paper 1 - Marking Scheme

This document provides a marking scheme for a Computer Science exam for Class XII. It lists 6 questions with subparts that will be asked on the exam. For each subpart, it provides the expected answer and how many marks will be awarded for correctly answering it. It also provides some sample code or explanations for what is being tested in each question. The marking scheme is broken down question-by-question to specify the essential information for both exam takers to understand what will be covered, and for graders to fairly assess answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views10 pages

Sample Paper 1 - Marking Scheme

This document provides a marking scheme for a Computer Science exam for Class XII. It lists 6 questions with subparts that will be asked on the exam. For each subpart, it provides the expected answer and how many marks will be awarded for correctly answering it. It also provides some sample code or explanations for what is being tested in each question. The marking scheme is broken down question-by-question to specify the essential information for both exam takers to understand what will be covered, and for graders to fairly assess answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

SAMPLE PAPER -I

Computer Science (Code: 083)


Class XII

Marking Scheme
Time: 3 Hrs. MM: 70

Instructions:
i. All Questions are Compulsory.
ii. Programming Language: Python

1 (a) Write names of two mutable data types and two immutable data types available in python. 2
Ans Mutable data type: List, Dictionary
Immutable Data type: Tuple, String
(1/2 mark for each correct data type)
(b) Name the python library module which need to be imported to run the following program: 1
print (sqrt(random.randint(1,16)
Ans math, random
(1/2 mark for each correct answer)
(c ) Rewrite the following code in python after removing all syntax error(s). Underlining each 2
correction done in the code.
30=x
For I in range(2,6)
if x>30:
print(“true”)
else
Print(“False”)
Ans x=30
for I in range(2,6):
if x>30:
print(“true”)
else:
print(“False”)
(1/2 mark for each correction not exceeding 2 marks)
Or
( 1 mark for identifying the errors, without suggesting correction)
(d) Find and write the output of the following python code: 2
Msg="CompuTer"
Msg1=''
for i in range(0, len(Msg)):
if Msg[i].isupper():
Msg1=Msg1+Msg[i].lower()
elif i%2==0:
Msg1=Msg1+'*'
else:
Msg1=Msg1+Msg[i].upper()
print(Msg1)
Ans cO*P*t*R
(2 mark for correct answer and ½ mark for partially correct answer)
(e) Find and write the output of the following python code: 3
def Alter(x,y=20):
x=x*y
y=x%y
print (x,'*',y)
return (x)
a=200
b=30
a=Alter(a,b)
print (a,'$',b)
b=Alter(b)
print (a,'$', b)
a=Alter(a)
print (a,'$',b)
Ans 6000 * 0
6000 $ 30
600 * 0
6000 $ 600
120000 * 0
120000 $ 600
½ marks for each correct line of output
Deduct ½ marks for not writing ‘*’and ‘$’ symbol correctly
(f) What possible outputs are expected to be displayed on the screen at the time of execution of the 2
program from the following code? Also specify the minimum and maximum values that can be
assigned to the variable c.
import random
temp=[10,20,30,40,50,60]
c=random.randint(0,4)
for I in range(0, c):
print(temp[i],”#”)
(i) 10#20# (ii) 10#20#30#40#50#
(iii). 10#20#30# (iv) 50#60#

Ans (i) & (iii) Minimum value of C is 0 and Maximum value is 3


1/2 mark for writing each correct answer not exceeding 1
½ mark for minimum value of c
½ mark for maximum value of c
2 (a) Write a recursive function to calculate the Fibonacci Series up to n terms. 2
Ans def Fibo(n):
if n<=1:
return n
else:
return (Fibo(n-1)+Fibo(n-2)

½ mark for declaration of correct function header and 1.5 mark for logic
(b) Write a statement in python to open a text file REWRITE.TXT so that new content can be read 1
or written from it.
Ans file=open(“REWRITE.TXT”, “w”)
Or
file=open(“REWRITE.TXT”, “w+”)
Or
file=open(“REWRITE.TXT”, “r”)
1 mark for correct statement
(c) A text file “Quotes.Txt” has the following data written in it: 2
Living a life you can be proud of
Doing your best
Spending your time with people and activities that are important to you
Standing up for things that are right even when it’s hard
Becoming the best version of you
Write a user defined function to display the total number of words present in the file.
Ans def countwords():
S=open(“Mydata”, “r”)
f=S.read()
z=f.split()
count=0
for I in z:
count=count+1
print(“Total number of words”,count)
(½ mark for reading the file using read)
(½ mark for correctly using split())
(½ mark for the correct loop)
(½ mark for displaying the correct value of count)
3 (a) Consider the following unsorted list 3
95 79 19 43 52 3
Write the passes of bubble sort for sorting the list in ascending order till the 3rd iteration.
Ans [79, 19, 43, 52, 3, 95]
[19, 43, 52, 3, 79, 95]
[19, 43, 3, 52, 79, 95]
(1 mark for each correct iteration in sequence.)
(b) Name the function that you will to create a line chart and Pie Chart. 2
Ans matplotlib.pyplot.plot()
matplotlib.pyplot.pie()
1 mark for each correct function
(c ) Define Big-O notation. State the two factors determine the complexity of algorithm. 2
Ans It is used to depict an algorithm’s growth rate. The growth rate determines the
algorithm’s performance when its input size grows. Through Big-O, the upper bound of
the algorithm’s performance is specified.
Internal Factors: a) Time required to run b) Space of memory required to run
External Factor: a) Size of the input b) Speed of computer c) Quality of the computer

1 mark for definition and 1 mark for factor satement


(d) Calculate the time complexity of the Insertion sort. 2
aList=[15,6,13,22,3,52,12]  takes constant time say c0
print(‘Original list if ‘, aList)  takes constant time say c1
n=len(aList)  takes constant time say c2
for i in range(1, n):  takes constant time say c3 and repeats n times
key=aList[i]  takes constant time say c4
j=i-1  takes constant time say c5
while j>=0 and key<aList[j]:  takes constant time say c6 and repeats n tmes
aList[j+1]=aList[j]  takes constant time say c7
j=j-1  takes constant time say c8
else:
aList[j+1]=key  takes constant time say c9
print(‘List after sorting :’, aList)  takes constant time say c10
Total time taken= c0+c1+c2+c10+n(c3+c4+c5+n(c6+c7+c8+c9))
=c0+c1+c2+c10+n(c3+c4+c5)+n2(c6+c7+c8+c9)
Time complexity= O(n2)
2 marks for correct answer with correct steps and 1 mark for correct answer
(e ) Evaluate the following postfix using stack & show the content of the stack after the execution 2
of each:
20, 4, +, 3, -, 7, 1
Ans S.no Symbol Operation Stack Result
1 20 Push(20) 20
2 4 Push(4) 20,4
3 + Pop(4) 20
4 Pop(20)
Perform(20+4)
Push(24) 24
5 3 Push(3) 24,3
6 - Pop(3) 24
Pop(24)
Perform(24-3)
Push(21) 21
7 7 Push(7) 21,7
8 / Pop(7) 21
Pop(21)
Perform(21/7)
Push(3) 3
9 Pop(3) Result=3
[½ mark each for correctly evaluating expression up to each operator.]
[½ mark for correct answer]
( f) Write functions to perform insert and delete operation in a Queue 4
def qins(Qu, item):
Qu.append(item)
if len (Qu)==1:
front=rear=0
else:
rear=len(Qu)-1

def qdel(Qu):
if isEmpty(Qu):
return ‘Underflow’
else:
item=Qu.pop(0)
if len(Qu)==0:
front=rear=None
return item
½ mark for function header of each and 1.5 mark for correct logic of each
4 (a) Write the expanded name for the following abbreviated terms used in Networking and 2
Communication:
(i) SMTP (ii) NFC (iii) FTP (iv) VoIP
(i) Simple mail transfer protocol (ii) Near Field Communication (iii) File transfer
protocol (iv) Voice over internet protocol
½ marks for each correct answer
(b) Daniel has to share the data among various computers of his two offices branches situated 1
in the same city. Name the network (out of LAN, WAN, PAN and MAN) which is being
formed in this process.
Ans MAN
(1 mark for correct answer)
(c ) What are the enabling technologies of IoT system. 1
Ans RFID, Sensors, Smart Technologies, Efficient network connectivity
½ mark for two correct technology
(d) What is CSMA/CA? How does it works. 2
Ans In CSMA/CA, as soon as a node receives a packet that is to be sent, it checks to be sure the
channel is clear (no other node is transmitting at the time). If the channel is clear, then the
packet is sent. If the channel is not clear, the node waits for a randomly chosen period of
time, and then checks again to see if the channel is clear. This period of time is called the
backoff factor, and is counted down by a backoff counter. If the channel is clear when the
backoff counter reaches zero, the node transmits the packet. If the channel is not clear when
the backoff counter reaches zero, the backoff factor is set again, and the process is repeated.
1 mark for definition and 1 mark for working

(e ) Rehaana Medicos Center has set up its new center in Dubai. It has four buildings as shown (e )
in the diagram given below:

Accounts Research
Lab

Packaging
Store Unit
Distance between various building are as follows:

Accounts to research Lab 55m


Accounts to store 150m
Store to packaging unit 160m
Packaging unit to research lab 60m
Accounts to packaging unit 125m
Store to research lab 180m

Number of Computers
Accounts 25
Research Lab 100
Store 15
Packaging Unit 60

As a network expert, provide the best possible answer for the following
queries:
i) Suggest a cable layout of connections between the buildings.
ii) Suggest the most suitable place (i.e. buildings) to house the server of this
organization.
iii) Suggest the placement of the following device with justification:
a) Repeater b) Hub/Switch
iv) Suggest a system (hardware/software) to prevent unauthorized access to or
from the network.
Ans
(i) Layout

Accounts Research
Lab

Packaging
Store Unit

(1 mark for drawing any correct layout)

(ii)The most suitable place/ building to house the server of this organization would be
building Research Lab, as this building contains the maximum number of computers.
(1 mark for correct answer)
(iii)
a) For layout1, since the cabling distance between Accounts to Store is quite large, so a
repeater would ideally be needed along their path to avoid loss of signals during the course
of data flow in this route. For layout2, since the cabling distance between Store to
Recresearch Lab is quite large, so a repeater would ideally be placed.
b) In both the layouts, a Hub/Switch each would be needed in all the buildings to
interconnect the group of cables from the different computers in each building.
(½ mark for each correct answer)

(iv) Firewall
(1 mark for correct answer)
(f) Discuss how IPv4 is differs from IPv6. 2
An IP address is binary numbers but can be stored as text for human readers. For example,
a 32-bit numeric address (IPv4) is written in decimal as four numbers separated by periods.
Each number can be zero to 255. For example, 1.160.10.240 could be an IP address.

IPv6 addresses are 128-bit IP address written in hexadecimal and separated by colons
1 mark for one difference
(g) What is network congestion? What are its symptoms? 2
ust like in road congestion, Network Congestion occurs when a network is not able to adequately
handle the traffic flowing through it. While network congestion is usually a temporary state of a
network rather than a permanent feature, there are cases where a network is always congested
signifying a larger issue is at hand.
Symptoms: Excessive packet delay, Use of data packets, Retransmission
1 mark for definition and 1 mark for symptoms
(h) Name any two network tools. 1
Ping, whois lookup
½ mark for each tool
(a) Define degree and cardinality. Based upon given table write degree and 2
cardinality.

PATIENTS
PatNo PatName Dept DocID
1 Leena ENT 100
2 Supreeth Ortho 200
3 Madhu ENT 100
4 Neha ENT 100
5 Deepak Ortho 200
Ans Degree=4
Cardinality=5
1 mark for degree and 1 mark for cardinality
(b) Write SQL commands for the queries (i) to (iv) and output for (v) & (viii) based (b)
on a table COMPANY and CUSTOMER .

COMPANY
CID NAME CITY PRODUCTNAME
111 SONY DELHI TV
222 NOKIA MUMBAI MOBILE
333 ONIDA DELHI TV
444 SONY MUMBAI MOBILE
555 BLACKBERRY MADRAS MOBILE
666 DELL DELHI LAPTOP

CUSTOMER
CUSTID NAME PRICE QTY CID
101 Rohan Sharma 70000 20 222
102 Deepak Kumar 50000 10 666
103 Mohan Kumar 30000 5 111
104 Sahil Bansal 35000 3 333
105 Neha Soni 25000 7 444
106 Sonal Aggarwal 20000 5 333
107 Arjun Singh 50000 15 666

(i) To display those company name which are having price less than 30000.
(ii) To display the name of the companies in reverse alphabetical order.
(iii) To increase the price by 1000 for those customer whose name starts with
‘S’
(iv) To add one more column totalprice with decimal(10,2) to the table customer
(v) SELECT COUNT(*) ,CITY FROM COMPANY GROUP BY CITY;
(vi) SELECT MIN(PRICE), MAX(PRICE) FROM CUSTOMER WHERE
QTY>10 ;
(vii) SELECT AVG(QTY) FROM CUSTOMER WHERE NAME LIKE “%r%;
(viii) SELECT PRODUCTNAME,CITY, PRICE FROM COMPANY,CUSTOMER
WHERE COMPANY.CID=CUSTOMER.CID AND PRODUCTNAME=”MOBILE”;
Ans (i) select name from customer where price <30000;
½ mark for writing correct select clause or 1 mark for writing correct
query
(ii) select name from company order by name desc.
½ mark for writing correct select clause or 1 mark for writing correct
query
(iii) update customer set price=price+1000 where name like “S%”;
½ mark for writing correct update clause or 1 mark for writing correct
query
(iv) alter table customer add totalprice decimal(10,2);
½ mark for writing correct alter clause or 1 mark for writing correct
query
(v) count(*) city
3 DELHI
2 MUMBAI
1 MADRAS
½ mark for writing correct output
(vi) MIN(PRICE) MAX(PRICE)
50000 70000
½ mark for writing correct output
(vii) AVG(QTY)
12
½ mark for writing correct output
(viii) PRODUCTNAME CITY PRICE
MOBILE MUMBAI 70000
MOBILE MUMBAI 25000
½ mark for writing correct output

6 (a) What is secured data transmission? What technical ways are used to ensure 2
the secure data transmission?
secure transmission refers to the transfer of data such as confidential or
proprietary information over a secure channel. Many secure transmission
methods require a type of encryption.
Technical ways:
E-mail encryption. A number of vendors offer products that encrypt e-mail
messages, are easy to use and provide the ability to send private data,
including e-mail attachments, securely. ...
Web site encryption. ...
Application encryption. ...
Remote user communication. ...
Laptops and PDAs. ...
Wireless networks.
1 mark for definition and 1 mark for technical ways
(b) Expand the terms: 2
a) GNU b) FLOSS

a) GNU’s not Unix b) Free Libre open source softwares


1 mark for each correct answer
(c ) What is intellectual property? What do you understand by intellectual property right? 2
Intellectual property (IP) refers to creations of the mind, such as inventions; literary and artistic
works; designs; and symbols, names and images used in commerce.
A right that is had by a person or by a company to have exclusive rights to use its own plans, ideas,
or other intangible assets without the worry of competition, at least for a specific period of time.
These rights can include copyrights, patents, trademarks, and trade secrets.
1 mark for definition and 1 mark for definition of right
(d) What is cybercrime? Give example. 2
Cybercrime is defined as a crime in which a computer is the object of the crime (hacking,
phishing, spamming) or is used as a tool to commit an offense (child pornography, hate
crimes). Cybercriminals may use computer technology to access personal information,
business trade secrets or use the internet for exploitative or malicious purposes. Criminals
can also use computers for communication and document or data storage. Criminals who
perform these illegal activities are often referred to as hackers.
1 mark for definition and 1 mark for example
(e) What is identity theft? 2
Identity theft, also known as identity fraud, is a crime in which an imposter obtains key
pieces of personally identifiable information, such as Social Security or driver's license
numbers, in order to impersonate someone else.
2 mark for correct answer
7 (a) What is Django templates? 2
A Django template is a string of text that is intended to separate the
presentation of a document from its data. A template defines placeholders and
various bits of basic logic (template tags) that regulate how the document
should be displayed.
2 marks for correct answer
(b) Name the file data found in project web application folder. 1
__init__.py, settings.py, urls.py, wsgi.py
½ marks for two correct answer
(c) Identify the view functions from the following URL confs and write their function 2
header.
a) path(‘home/’,views.main) b) path(‘home/check/’,views.newone)
c)path(‘check/’,views.onenew) d) path(‘check/home/’,views.core)
a) def main(request): b) def newone(request): c) def onenew(request):
e) def core(request)
½ marks for each correct answer
(d) What is database connectivity? Which package must be imported in python to 2
create a database connectivity application?
Ans Database connectivity refers to connection and communication between an
application and the database system.
Package for connectivity:
Mysql.connector
1 mark for definition and 1 mark for package

You might also like