Sample Paper 1 - Marking Scheme
Sample Paper 1 - Marking Scheme
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#
½ 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
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:
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
(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