Professional Documents
Culture Documents
General Instructions:
The answers given in the marking scheme are SUGGESTIVE, Examiners are requested to award marks for
all alternative correct Solutions/Answers conveying the similar meaning.
In Python, ignore case sensitivity for identifiers (Variable / Functions/Keywords).
In Python indentation is mandatory, however, number of spaces used forindenting may vary.
In SQL related questions – both ways of text/character entries should beacceptable
for Example: “AMAR” and ‘amar’ both are acceptable.
In SQL related questions – all date entries should be acceptable for Example:YYYY‐MM‐DD’,
‘YY‐MM‐DD’, ‘DD‐Mon‐YY’, “DD/MM/YY”, ‘DD/MM/YY’,“MM/DD/YY”,
‘MM/DD/YY’ and {MM/DD/YY} are correct.
In SQL related questions – semicolon should be ignored for terminating the SQLstatements
In SQL related questions, ignore case sensitivity.
Accept the codes written in Python 2.X or 3.X, ignore the variations due to the versions or different
distributions of Python.
Adopt step-wise marking.
Answer
IDLE is Python's Integrated Development and LearningEnvironment.
(1 Mark for correct Answer)
Answer
Keywords : None, break
Valid Identifiers : Final, _number
( ½ Marks for each correct answer option)
c. Observe the following Python code and write the output of statement (i) and (ii) if the 2
value entered for p2 is ‘abc’
>>> p1 = ‘abc’
>>> p2 = input(“Enter a String”)
(ii) >>> p1 is p2
Answer
---1---
(i) True (1 Marks for correct answer )
(ii) False (1 Marks for correct answer )
d. What will be output of following: 2
>>> a, b, c = 15.9 , 3 , 20 Answer
>>> print(a/b) 5.3
>>> print(a//b) 5.0
>>> print(c% b) 2
>>> print(b**2) 9
( ½ Marks for each correct answer ,
Total ½ x 4 = 2 )
e Write a Python code to input a number and display the message after checking the 2
conditions as follows:-
Answer
x=int(input("Input any number ")) ½ Marks
if x < 0:
print("Number is negative") ½ Marks
elif x==0:
print("Number is zero") ½ Marks
else:
print("Number is positive") ½ Marks
(ii) >>>X="GoodWork" 1
>>>tuple(X)
Answer
Output is:
('G', 'o', 'o', 'd', 'W', 'o', 'r', 'k')( 1 Marks for correct output
Deduct ½ marks if ( ) tuple braces are not used)
2.a Write a Python script to print Fibonacci series’ first 20 elements. Some initial elements 3
of a Fibonacci series are: 0, 1, 1, 2, 3, 5, 8, 13 , . . .
Answer
a,b=0,1 ½ Marks
print(a,b,end=' ') ½ Marks
for x in range(3,21): 1 Marks
c=a+b
print(c,end=' ')
a,b=b,c 1 Marks
---2---
ORFull 3 Marks of alternative correct coding
>>> St = “HellOWorld”
>>> print(St*:2+, St*: ─2+ )
>>> print( St*3 : ─ 4+
Answer
He HellOWor
lOW(1 Marks for each correct line)
c. Differentiate between syntax error and logical error in a program. Also give suitable 2
example for each type of error.
Answer
An error in program resulting from code that does not conform to the syntax
of the programming language is called Syntax Error. It is detected by the language
compiler / interpreter.
Example:-
a=0
while a < 10 # : not used, a syntax error
a=a+1
( ½ + ½ Marks for each correct difference (any one) between syntax error and logical
error. ½ + ½ Marks for each correct example )
d. Distinguish between LIST and TUPLE in Python? Also give suitable example. 2
Answer
Lists: List is a sequence of values of any type. Values in the list are calledelements /
items. These are mutable and indexed/ordered. List is enclosed insquare brackets.
Example: Lst = * 1,2,3,’a’,’b’,’p’ +
Tuples: Tuples are a sequence of values of any type, and are indexed byintegers. They
are immutable. Tuples are enclosed in ().
Example: T = ( 1,2,3,’a’,’b’,’p’ )
( ½ + ½ Marks for each correct difference (any one) between syntax error and logical
error. ½ + ½ Marks for each correct example )
e. Write a Python Code to search an element in the given list without using built-in 3
function for searching.
Answer
---3---
DATA_LIST=[23,14,17,34,56,11,19,21] ½ Marks
ELEM = int(input("Enter value of element to search in the list ")) ½ Marks
flag=0
f. Write the most appropriate list method to perform the following task. 2
(i) Add an element at the end of the list
(ii) Update an element at the beginning of the list.
Answer
L = [1,11,15,16]
(i) L.append(item) 1 marks for correct syntax or example
(ii) L[index]= <new_value> 1 marks for correct syntax or example
Answer
[(1, 100), (2, 200), (3, 300), (4, 400), (5, 500)] 1 Marks
[1, 2, 3, 4, 5] ½ Marks
[100, 200, 300, 400, 500] ½ Marks
---4---
d Write Python Code for arranging the unsorted list elements in ascending order by using 4
Bubble sorting technique.
For example the list is :
DATA_LIST= [12, 7, 19, 2, 14, 3, 9]
Answer
DATA_LIST=[23,14,17,34,56,11,19,21]
print('Unsorted list : ',DATA_LIST)
for i in range(len(DATA_LIST)):
for j in range(len(DATA_LIST)-i-1):
if DATA_LIST[j] > DATA_LIST[j+1]:
DATA_LIST[j+1], DATA_LIST[j] = DATA_LIST[j],DATA_LIST[j+1]
print('Sorted List: ',DATA_LIST)
(Correct first for loop ½ marks, Correct second for loop ½ marks , Correct if statement
1 marks, swapping 1 Marks )
4a. Name any two operating systems used in Mobiles? 1
( ½ marks for each correct Mobile OS, OR 1 for correct 2 Mobile OS)
b. Write any two differences between RAM and ROM? 2
( 2 marks for any two correct differences )
c. Name two types of Language processors. 1
Answer
Assemble, Compiler and Interpreter ( 1 Marks for correct answer)
d. Expand the following: 1
a) EEPROM b)USB
Answer
a. Electrically Erasable Programmable Read Only Memory ½ Marks
b. Universal Serial Bus ½ Marks
e. Convert ( 43 )10to binary equivalent. 1
Answer (101011 )2
(1 Marks for correct answer, ½ marks for only correct steps)
f. Name any two Unicode encoding schemes. 1
Answer : UTF-8, UTF 16, UTF 32 ( 1 for any two correct answer, ½ for each)
g. Arrange the following in ascending order of memory capacity: 1
Terabyte , Byte,Kilobyte, Nibble, Megabyte, Gigabyte
Answer : Nibble < Byte < Kilobyte < Megabyte < Gigabyte < Terabyte
h. Draw the diagram of digital circuit for A .( B + C ) 2
---5---
5 a. What will be the degree and cardinality of following relation ITEM? 2
ITEM
ItemCode ItemName Price
AB1 Milk 48.00
AB2 Bread 25.00
AB3 Cream 47.00
AB4 Cake 120.00
Answer : Degree 3 , Cardinality : 4
( 2 marks for correct answer / 1 for each correct answer)
b. Define the term Primary Key and Candidate Key in context of Relational Database. 2
Answer:
( 2 marks for correct answer / 1 for each correct definition or example)
c. Expand the terms : 1
a) DML b) SQL
Answer:
DML : Data Manipulation Language ½ Marks
SQL : Structured Query Language ½ Marks
6a Observe the following tables Watches and Sales and write SQL commands for the 4
queries (i) to (iv)
i. To display all the details of those watches whose name ends with‘Time’
ii To display watch’s name and price of those watches which have pricerange in between
5000-15000.
iii To display total quantity in store of Unisex type watches.
---6---
iv To display watch name and their quantity sold in first quarter.
Answer
i. SELECT * FROM watches WHERE watch_name LIKE ‘%Time’
ii. SELECT watch_name, price FROM watches WHERE price between 5000and 15000;
(1 Mark for correct CREATE TABLE command and 1 mark for PRIMARY KEY constraint )
d. Write SQL command to fetch the given record into above relation STUDENTS 1
The record of Jayashree is :
( ½ Mark for correct INSERT INTO + ½ Marks for using VALUE command correctly)
e. Write SQL statement to add one column SEC of CHAR type of size 1 in the above 1
relation STUDENT .
(1 Marks for ALTER TABLE Students ADD SECCHAR(1) )
---7---
7. a. Mr. Rohan wants to prevent unauthorized access to/from his company's local area 1
network. Write the name of the system, which he should install to do the same.
Answer : Firewall ( 1 Mark for correct answer)
b. Explain the following terms: (a) Malware b) Trojans 2
Answer:
Malware:-software that is specifically designed to disrupt, damage, or gain unauthorized
access to a computer system.
e 1
Exploring appropriate and ethical behaviours related to online environments and digital
media is called __________________. (Select the best option)
---8---