SEC A (3)
SEC A (3)
XII ( Comp.Sci)
SEC-A
1 State True or False 1
“If a loop terminates using break statement, loop else will not execute”
2 BETWEEN clause in MySQL cannot be used for 1
a) Integer Fields b) Varchar fields
c) Date Fields d) None of these
3 What will be the output of the following code snippet? 1
a=10
b=20
c=-5
a,b,a = a+c,b-c,b+c
print(a,b,c)
a) 5 25 -5 b) 5 25 25
c) 15 25 -5 d) 5 25 15
4 What is the result of the following code in python? 1
S="ComputerExam"
print(S[2]+S[-4]+S[1:-7])
a) mEomput b) mEompu
c) MCompu d) mEerExam
5 command is used to add a new column in an existing table in MySQL? 1
6 The IP (Internet Protocol) of TCP/IP transmits packets over Internet using _ 1
switching.
a) Circuit b) Message
c) Packet d) All of the above
7 Consider a list L = [5, 10, 15, 20], which of the following will result in an error. 1
a) L[0] += 3 b) L += 3 c) L *= 3 d) L[1] = 45
8 Which of the following is not true about dictionary ? 1
a) More than one key is not allowed
b) Keys must be immutable
Page 1 of 8
c) Values must be immutable
d) When duplicate keys encountered, the last assignment wins
9 Which of the following statements 1 to 4 will give the same output? 1
tup = (1,2,3,4,5)
print(tup[:-1]) #Statement 1
print(tup[0:5]) #Statement 2
print(tup[0:4]) #Statement 3
print(tup[-4:]) #Statement 4
a) Statements 1 and 2 b) Statements 2 and 4
c) Statements 2 and 5 d) Statements 1 and 3
10 What possible outputs(s) will be obtained when the following code is 1
executed?
import random
VALUES = [10, 20, 30, 40, 50, 60, 70, 80]
BEGIN = random.randint(1,3)
LAST = random.randint(BEGIN, 4)
for x in range(BEGIN, LAST+1):
print(VALUES[x], end = "-")
a) 30-40-50- b) 10-20-30-40-
c) 30-40-50-60- d) 30-40-50-60-70-
11 Which of the following command is used to move the file pointer 2 bytes ahead from the 1
current position in the file stream named fp?
a) fp.seek(2, 1) b) fp.seek(-2, 0)
c) fp.seek(-2, 2) d) fp.seek(2, -2)
12 Predict the output of the following code: 1
def ChangeLists(M , N):
M[0] = 100
N = [2, 3]
L1 = [-1, -2]
L2 = [10, 20]
ChangeLists(L1, L2)
print(L1[0],"#", L2[0])
a) -1 # 10 b) 100 # 10
c) 100 # 2 c) -1 # 2
13 Which of the following is not a function of csv module? 1
a) readline() b) writerow()
c) reader() d) writer()
14 State True or False 1
“A table in RDBMS can have more than one Primary Keys”
15 COUNT(*) function in MySQL counts the total number of in a table. 1
a) Rows b) Columns
c) Null values of column d) Null values of a row
16 Which of the following is not a method for fetching records from MySQL table using Python 1
interface?
a) fetchone() b) fetchrows()
c) fetchall() d) fetchmany()
Page 2 of 8
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice
as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17 Assertion (A):- Text file stores information in ASCII or UNICODE characters. 1
Reasoning (R):- In text file there is no delimiter(EOL) for a line.
18 Assertion (A):- HAVING clause is used with aggregate functions in SQL. 1
Reasoning (R):- WHERE clause places condition on individual rows.
SEC-A
1 State True or False: 1
“Python is a case sensitive language i.e. upper and lower cases are treated differently.”
Page 3 of 8
7 Given the followingdictionaries 1
a. 7TRAa d
b. 7tRAa d
c. 7TrAa d
d. 7trAa d
9 Which of the following statement(s) would give an error after executing the 1
Following code?
S="Welcome to class XII" # Statement 1
print(S) # Statement 2
S="Thank you" # Statement 3
S[0]= '@' # Statement 4
S=S+ "Thank you" # Statement 5
a. Statement 3 b. Statement 4
c. Statement 5 d. Statement 4 and 5
a. Delhi#Mumbai#Chennai#Kolkata# b. Mumbai#Chennai#Kolkata#Mumbai#
c. Mumbai# Mumbai #Mumbai # Delhi# d. Mumbai# Mumbai #Chennai # Mumbai
[2]
Page 4 of 8
11 Fill in the blank: 1
The modem at the received computer end acts as a .
a. Model
b. Modulator
c. Demodulator
d. Convertor
Which of the following statements should be given in the blank for#Missing Statement,
if the output produced is 110?
Options:
a. global a
b. global b=100
c. global b
d. global a=100
13 State whether True or False : 1
When you connect your mobile phone with your laptop, the network formed is called as
LAN.
14 Fill in the blank: 1
18 Assertion (A):- If the arguments in a function call statement match the number 1
and order of arguments as defined in the function definition, such argumentsare called
positional arguments.
Reasoning (R):- During a function call, the argument list first contains default
argument(s) followed by positional argument(s).
SEC-A
SECTION A
1. Assigna tuplecontaining anInteger? (1)
5. Fillintheblank: (1)
Commandis used toadd anewcolumn in atableinSQL.
a)update b)remove c)alter d)drop
6. Consider the Python statement: f.seek(10, 1) (1)
Choosethecorrectstatementfromthefollowing:
(a) Filepointerwillmove10byteinforwarddirectionfrombeginningofthefile
(b) Filepointerwillmove10byteinforwarddirectionfromendofthefile
(c) Filepointerwillmove10 byteinforwarddirectionfromcurrentlocation
(d) Filepointerwillmove10byteinbackwarddirectionfromcurrentlocation
7. ChoosecorrectSQLquerywhichisexpectedtodeleteallrowsofatableempwithout deleting its (1)
structure.
a) DELETETABLE;
b) DROP TABLE emp;
c) REMOVETABLemp;
d) DELETEFROMemp;
8. Whichofthe following isNOT a DMLCommand? (1)
(a)Insert (b)Update (c)Drop (d)Delete
Page 6 of 8
9. Selectthecorrectoutputothecode: (1)
a="Year2022atallthe
best"a=a.split('a')
b=a[0]+"-"+a[1]+"-"+a[3]
print (b)
a) Year–0-atAllthebest
b) Ye-r2022-llthebest
c) Year–022-atAllthebest
d) Year–0-atallthebest
10. Whichofthefollowingstatement(s)wouldgiveanerrorduringexecution?
S="Lucknow is the Capital of UP " #Statement1
print(S) #Statement2
S[4]='$’ #Statement3
S="Thankyou" #Statement4
S=S+"Thankyou" #Statement5
Page 7 of 8
Q17and18areASSERTIONANDREASONINGbasedquestions.Markthecorrect choice as
a) BothAand Raretrue andR isthecorrectexplanationforA
b) BothA andR aretrue andRis notthecorrectexplanationfor
c) Ais Truebut R isFalse
d) Ais false butR isTrue
SECTION – A
Q1. State True or False (1)
"In Python, data type of a variable depends on its value"
Q2. The correct definition of column ‘alias’ is (1)
a. A permanent new name of column
b. A new column of a table
c. A view of existing column with different name
d. A column which is recently deleted
Q3 What will be the output of the following python expression? print(2**3**2) (1)
a. 64 b. 256 c. 512 d. 32
Q4. What will be the output of the following python dictionary operation?data (1)
= {'A':2000, 'B':2500, 'C':3000, 'A':4000}
print(data)
a. {'A':2000, 'B':2500, 'C':3000, 'A':4000}
b. {'A':2000, 'B':2500, 'C':3000}
c. {'A':4000, 'B':2500, 'C':3000}
d. It will generate an error.
Q5. In MYSQL database, if a table, Alpha has degree 5 and cardinality 3, and another table, Beta (1)
has degree 3 and cardinality 5, what will be the degree and cardinality of the Cartesian product of
Alpha and Beta?
a. 5,3 b. 8,15 c. 3,5 d. 15,8
Q6. Identify the device on the network which is responsible for forwarding data from one device (1)
to another
a. NIC b. Router c. RJ45 d. Repeater
Q7. Choose the most correct statement among the following – (1)
Page 1 of 10
a. a dictionary is a sequential set of elements
b. a dictionary is a set of key-value pairs
c. a dictionary is a sequential collection of elements key-value pairs
d. a dictionary is a non-sequential collection of elements
Q8. Select the correct output of the code: a (1)
= "Year 2024 at all the best" a
= a.split('a')
b = a[0] + "-" + a[1] + "-" + a[3]
print (b)
Q9. Which of the following statement(s) would give an error during execution? (1)
S=["CBSE"] # Statement 1
S+="Delhi" # Statement 2
S[0]= '@' # Statement 3
S=S+"Thank
you" # Statement 4
a) Statement 1b) Statement 2 c) Statement 3 d) Statement 4
Q10. Give the output: (1)
dic1={‘r’:’red’,’g’:’green’,’b’:’blue’}
for i in dic1:
print
(i,end=’’)
a. rgb
b. RGB
c. RBG
d. rbg
Q11. Which function is used to display the unique values of a column of a table? (1)
a. sum()
b. unique()
c. distinct()
d. return()
Q12. Select the correct output of the code: for (1)
i in "QUITE":
print([i.lower()], end= "#")
a. q#u#i#t#e#
b. [‘quite#’]
c. ['q']#['u']#['i']#['t']#['e']#
d. [‘quite’] #
Q13. The statement which is used to get the number of rows fetched by execute() method of (1)
cursor:
Page 2 of 10
a. cursor.rowcount b. cursor.rowscount()
c. cursor.allrows() d. cursor.countrows()
Q14. Select the correct statement, with reference to SQL: (1)
a. Aggregate functions ignore NULL
b. Aggregate functions consider NULL as zero or False
c. Aggregate functions treat NULL as a blank string
d.NULL can be written as 'NULL' also.
Q15. is a communication protocol responsible to control thetransmission of data over a (1)
network.
a. TCP (b) SMTP (c) PPP (d)HTTP
Q16. Which method is used to move the file pointer to a specified position. (1)
a. tell()
b. seek()
c. seekg()
d. tellg()
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as (1)
a. Both A and R are true and R is the correct explanation for A
b. Both A and R are true and R is not the correct explanation for
C. A is True but R is False
d. A is false but R is True
Q17. Assertion (A):- The number of actual parameters in a function call may not be equal to the (1)
number of formal parameters of the function.
Reasoning (R):- During a function call, it is optional to pass the values to default
parameters.
Q18. Assertion (A): A tuple can be concatenated to a list, but a list cannot be concatenated to a (1)
tuple.
Reason (R): Lists are mutable and tuples are immutable in Python.
SECTION
A
1. State True or False: 1
Python Keywords cannot be variables.
2. What will be the datatype of d, if d = (15) ? 1
(a) int (b) tuple (c) list (d) string
3. What will be the output of the following expressions: a) 2**3**2 b) (2**3)**2 1
a) a: 512 b. 64
b) a: 64 b. 512
c) a: 1024 b. 64
d) a: 64 b. 64
4. Table A has 3 rows and 4 columns and Table B has 5 rows and 6 columns. What 1
is the degree and cardinality of Cartesian product of A and B?
a) Degree is 15 and CardinalityPage
is 15
3 of 10
b) Degree is 10 and Cardinality is 10
c) Degree is 10 and Cardinality is 15
d) Degree is 15 and Cardinality is 10
5. What will be output of the following code: 1
d1={1:2,3:4,5:6}
d2=d1.get(3,5)
print(d2)
a) 3 b) 4 c) 5 d) Error
6. Consider the given expression: 1
3 and 5<15 or 3<13 and not 12<2
Which of the following is the correct value of the expression?
a) True b) False c) None d) NULL
7. What will be the output of the following code:- 1
s="one two three"
s=s.split(
) print(s)
a) ['one', 'two', 'three'] b) ('one', 'two', 'three') c) [one, two, three]
d) None
8. Hanu wants to connect 10 computers in her office. What is the type of network? 1
a) LAN b) WAN c) PAN d) FAN
9. Consider the statements given below and then choose the correct output 1
from the given options:
s=”KVS@CBSE 2023”
print(s[-2:2:-2])
a) 22EB@ b) 2023@kvs c) KVS@2023 d) 30 SCS
10. Which of the following MySQL command/clause is used to sort the data in a table 1
a) SORT b) ASCENDING c) ORDER BY d) DROP
Page 4 of 10
11. Which of the following device is responsible for signal boosting 1
a) Repeater b) Router c) Switch d) Modem
12. function returns the current position of file pointer 1
a) tell() b) seek() c) first() d) last()
13. In the URL www.kvsangathan.nic.in , tells the type of website 1
a) www b) .in c) kvsangathan d) .nic
14. Which of the following is not an Aggregate function. 1
a) COUNT b) MIN c) MAX d) DISTINCT
15. What will be the output of the following code: 1
t=(2,3,[4,5,6],7)
t[2]=4
print(t)
a) (2,3,4,7) b) (2,3,[4],7) c) Type error d) None
16. What possible output(s) are expected to be displayed on screen at the time of 1
execution of the program from the following code?
import random
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],"#",end=’’)
(a) 20#50#30# (b) 20#40#45 (c) 50#20#40# (d) both (b) and (c)
Q 17 and 18 are ASSERTION AND REASONING based questions.
Mark the correct choice as
(a)Both A and R are true and R is the correct explanation for A
(b)Both A and R are true and R is not the correct explanation for A
(c)A is True but R is False (d)A is False but R is True
17. Assertion (A): CSV module allows to write a single record into each row in CSV 1
file using write row() function.
Reason (R): The write row() function creates header row in csv file by default.
18. Assertion (A):- In Python, statement return [expression] exits a function. 1
Reasoning (R):- Return statement passes back an expression to the caller. A
return statement with no arguments is the same as return None.
Q. SECTIONA Marks
No.
1. State True or False 1
“Variable declaration is implicit in Python”
2. Which SQL command is used to change some values in existing rows? 1
a) update b) insert c) alter d) order
3. Consider the following expression : 5+2**6<9+2-16//8 1
Which of the following will be correct output if the given expression is evaluated?
(a) 127 (b) True (c) False (d) Invalid expression
4. Which of the following refers to mathematical function? 1
a) sqrt b) rhombus c) add d) rhombus
1
5. In MYSQL database, if a table, Alpha has degree 5 and cardinality 3, and another table, Beta has degree 1
3 and cardinality 5, what will be the degree and cardinality of the Cartesian product of Alpha and Beta?
a) 5,3 b) 8,15 c) 3,5 d) 15,8
2
(a)COMPUTER-students-ARE-very-SMART (b) COMPUTER-STUDENTS-ARE-very-SMART
(c) computer-students-are-very-SMART (d) COMPUTER-STUDENTS-ARE-VERY-SMART
9. Which of the following statement(s) would give an error during execution ofthe 1
following code?
tup = (60,120,25,40,70,99)
print(tup) #Statement 1
tup [4] =80#Statement 2
print (tup [3] +50) #Statement 3
print(min(tup)) #Statement 4
Options:
a. Statement 1 b. Statement 2 c. Statement 3 d. Statement 4
10. What possible outputs(s) will be obtained when the following code is executed? 1
a. b.
RAMAN** SHIVAJI*
SHIVAJI** *
TAGORE** SHIVAJI**TAGORE**
c. d.
SHIVAJI** SHIVAJI** ASHOKA*
TAGORE** TAGORE** *
SHIVAJI*SHIVAJI*
TAGORE* TAGORE* TAGORE*
11. Fill in the blank: 1
The modem at the sender’s computer end acts as a .
a. Modelb. Modulatorc. Demodulatord. Convertor
12. What will be the output of the following Python code? 1
a) 65 b) error c) 75 d) 85
13. State True or False 1
An try block may have more than except blocks to handle exception.
14. Select correct collection of DDL Command? 1
3
(a) CREATE, DELETE, ALTER, MODIFY (b) CREATE, DROP, ALTER, UPDATE
(c) CREATE, DROP, ALTER, TRUNCATE (d) CREATE, DELETE, ALTER, UPDATE
15. A is a set of rules that governs data communication. 1
16. Which statement is used to retrieve the current position within the file: 1
a) fp.seek() b) fp.tell() c) fp.loc d) fp.pos
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17. Assertion(A): List is an immutable data type 1
Reasoning(R): When an attempt is made to update the value of an immutable variable, the oldvariable is
destroyed and a new variable iscreated by the same name in memory.
18. Assertion (A): A function is a block of organized and reusable code that is usedto perform a single 1
related action.
Reason (R): Function provides better modularity for your application and ahigh degree of code
reusability.
खं ड / SECTION-A
Ůʲ सं Ůʲ / Question अं क /
Q. No. Marks
1. State True or False 1
“break keyword skips remaining part of an iteration in a loop and compiler goes to
starting of the loop and executes again”
2. Find the valid keyword from the following? 1
a) Student-Name b) False c) 3rdName d) P_no
3. What will be the output for the following Python statement? 1
X={‘Sunil’:190, ‘Raju’:10, ‘Karambir’:72, ‘Jeevan’:115}
print(‘Jeevan’ in X, 190 in X, sep=”#”)
(a)True#False (b) True#True
(c) False#True (d) False#False
4. Consider the given expression: 1
True and False or not True
Which of the following will be correct output if the given expression is evaluated?
(a) True (b) False
(b) (c) NONE (d) NULL
5. Select the correct output of the code: 1
a = "Python! is amazing!"a
= a.split('!')
b = a[0] + "." + a[1] + "." + a[2]
print (b)
(a) Python!. is amazing!. (b) Python. is amazing.
(c) Python. ! is amazing.! (d) will show error
6. Which of the following mode in file opening statement overwrite the existing content? 1
(a) a+ (b) r+
(c) w+ (d) None of the above
1
7. The attribute which have properties to be as referential key is known as. 1
(a) foreign key (b)alternate key
(c) candidate key (d) Both (a) and (c)
8. Which command is used to change some values in existing rows? 1
(a) CHANGE (b) MODIFY
(b) (c) ALTER (d) UPDATE
9. Which of the following statement(s) would give an error after executing thefollowing 1
code?
Q="Humanity is the best quality" # Statement1
print(Q) # Statement2
Q="Indeed.” # Statement3
Q[0]= '#' # Statement4
Q=Q+"It is." # Statement5
(a) Statement 3 (b) Statement 4 (c)Statement 5 (d)Statement 4 and 5
10. p=150 1
def fn(q):
_ #missing statement
p=p+q
fn(50) print(p)
Which of the following statements should be given in the blank for #missingstatement if
the output produced is 200
(a) global p=150 (b) global p
(c) p=150 (d) globalq
2
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17. Assertion (A):- If the arguments in function call statement are provided in the format 1
parameter=argument, it is called keyword arguments.
Reasoning (R):- During a function call, the argument list first contain keywordargument(s)
followed by positional argument(s).
18. Assertion (A): CSV (Comma Separated Values) is a file format for data storage with one 1
record on each line and each field is separated by comma.
Reason (R): The format is used to share data between cross platform as text editors are
SECTION - A
1 Which of the following is a keyword in Python?
a) true b) For c) pre-board d) False 1
3
Tuple2=Tuple1*2
print(Tuple2)
a) 20 b) (20,) c) (10,10) d) Error
8 Fill in the blanks:
The SQL keyword ------------------is used in SQL expression to select records 1
based on patterns
9 What possible outcome will be produced when the following code is executed?
import random
value=random.randint(0,3)
fruit=["APPLE","ORANGE","MANGO","GRAPE"]
for i in range(value):
print(fruit[i],end='##')
print()
a) APPLE##
1
b) APPLE#
ORANGE##
c) APPLE## ORANGE##
d) ORANGE##
MANGO##
APPLE##
10 Select the network device from the following, which connects, networks with
different protocols 1
a) Bridge b)Gateway c)Hub d) Router
11 State whether the following statement is TRUE or FALSE :
1
The value of the expression 4/3*(2-1) and 4/(3*(2-1)) is the same
12 In the relational models , cardinality actually refers to --------------
a) Number of tuples b) Number of attributes 1
c) Number of tables d) Number of constraints
13 Data structure STACK is also known as ------------ list
a)First In First Out b) First In Last Out 1
c)Last In First Out d) Last In Last Out
14 Which function is used to write a list of strings in a file?
1
a) writeline( ) b) writelines( ) c) write() d) writeall( )
15 Which of the following is NOT a guided communication medium?
a) Twisted pair cable b) Microwave 1
c) Coaxial cable d) Optical fibre
16 Which of the following function header is correct?
a) def fun(a=1,b):
b) def fun(a=1,b,c=2): 1
c) def fun(a=1,b=1,c=2):
d) def fun(a=1,b=1,c=2,d):
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the
correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A .
(c) A is True but R is False
4
(d) A is false but R is True
17 Assertion ( A): In SQL, the aggregate function avg() calculates the average
value on a set of values and produces a single result.
Reason ( R): The aggregate functions are used to perform some fundamental 1
arithmetic tasks such as min(), max(), sum() etc
SECTION A
print(L)
for n in range(2,5,2):
print(random.randrange(1,n,end=’*’)
print(s)
6. Which of the following mode in file opening statement does not results in Nor generates an error if the file
Page
1
does not exist? 1
(a) r (b) r+ (c) w+ (d) None of the above
Page
2
8. Which of the following SQL statements is used to open a database named “SCHOOL”? 1
(a) CREATE DATABASE SCHOOL;
(b) USE DATABASE SCHOOL;
(c) USE SCHOOL;
(d) SHOW DATABASE SCHOOL;
if ‘o’ in v:
L.append(k)
print(L)
10.A relation can have only one key and one or more than one keys. 1
(a) PRIMARY, CANDIDATE
(b) CANDIDATE, ALTERNATE (c
)CANDIDATE ,PRIMARY
(d) ALTERNATE, CANDIDATE
11. Which of the following is the correct usage for tell() of a file object? 1
(a) It places the file pointer at the desired offset in a file.
(b)It returns the byte position of the file pointer as an
integer. (c)It returns the entire content of the file.
(d) It tells the details about the file.
12. What are the minimum number of attributes required to create a table in MySQL? 1
(a) 1 (b) 2 (c) 0 (d)3
13. is a standard mail protocol used to receive emails from a remote server to a local email client. 1
(a) SMTP (b) POP (c) HTTP (d) FTP
16. What are the mandatory arguments which are required to connect a MySQL database to python? 1
(a) username, password, hostname, database name
(b) username, password, hostname
(c) username, password, hostname, port
(d) username, password, hostname, database name
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct
choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Page 1of75
17. Assertion: The default value of an argument will be used inside a function if we do not pass a value to that
argument at the time of the function call. 1
Reason: the default arguments are optional during the function call. It overrides the default value if we
provide a value to the default arguments during function calls.
18. Assertion: Pickling is the process by which a Python object is converted to a byte stream. 1
Reason: load() method is used to write the objects in a binary file. dump() method is used to read data
from a binary file.
SECTION A
1 IdentifytheinvalidPython statementfromthefollowing. 1
(a)_b=1 (b)b1=1 (c)b_=1 (d)1 = _b
2 Identifythevalid arithmeticoperatorinPythonfromthefollowing. 1
(a)// (b) < (c) or (d) <>
3 If Statement in Python is 1
(a)looping statement (b)selectionstatement (c)iterative (d) sequential
4 PredictthecorrectoutputofthefollowingPythonstatement– print(4 + 1
3**3/2)
5 Choosethemostcorrectstatementamongthefollowing– 1
ifnotFalse:
print(10)
else:
print(20)
Page 2of75
(a)10 (b)20 (c)True (d) False
10 Identifythedeviceonthenetworkwhichisresponsibleforforwardingdatafromonedeviceto another 1
11 Atablehasinitially5columnsand8rows.Considerthefollowingsequenceofoperations performed 1
on the table –
i. 8rowsareadded
ii. 2columnsareadded
iii. 3rowsaredeleted
iv. 1column is added
Whatwill be thecardinalityanddegreeof thetableat theendofaboveoperations?
16 WhichofthefollowingmethodisusedtocreateaconnectionbetweentheMySQLdatabaseand Python? 1
(a)connector () (b)connect ( ) (c)con() (d) cont ()
SECTION A
1 IdentifytheinvalidPython statementfromthefollowing. 1
(a)_b=1 (b)b1=1 (c)b_=1 (d)1 = _b
2 Identifythevalid arithmeticoperatorinPythonfromthefollowing. 1
(a)// (b) < (c) or (d) <>
3 If Statement in Python is 1
(a)looping statement (b)selectionstatement (c)iterative (d) sequential
4 PredictthecorrectoutputofthefollowingPythonstatement– print(4 + 1
3**3/2)
5 Choosethemostcorrectstatementamongthefollowing– 1
ifnotFalse:
print(10)
else:
print(20)
Page 1of75
(a)10 (b)20 (c)True (d) False
10 Identifythedeviceonthenetworkwhichisresponsibleforforwardingdatafromonedeviceto another 1
11 Atablehasinitially5columnsand8rows.Considerthefollowingsequenceofoperations performed 1
on the table –
v. 8rowsareadded
vi. 2columnsareadded
vii. 3rowsaredeleted
viii. 1column is added
Whatwill be thecardinalityanddegreeof thetableat theendofaboveoperations?
16 WhichofthefollowingmethodisusedtocreateaconnectionbetweentheMySQLdatabaseand Python? 1
(a)connector () (b)connect ( ) (c)con() (d) cont ()
SECTIONA
2 StateTrueorFalse: 1
“Aspecialvalue“NULL”isusedtorepresentvaluesthatareunknownto certain
attributes.”
3 Whatistheresult afterexecutingthefollowing? 1
>>>print(20/4*5+8-10)
A. 1
B. 23
C. 23.0
D. 24
6 WhatisthesizeofIPv4address? 1
A. 32 bits
B. 64 bits
C. 64 bytes
D. 32 bytes
Page1of75
7 Whatwillbetheoutputofthefollowingpythonstatement? 1
L=[3,6,9,12]
L=L+15
print(L)
A. [3,6,9,12,15]
B. [18,21,24,27]
C. [5,3,6,9,12,15]
D. error
10 import random 1
AR=[20,30,40,50,60,70]
START=random.randint(1,3)
END=random.randint(2,4)
forPinrange(START,END+1):
print (AR[P],end=”#“)
11 isthedevicewhichisusedtoconvertdigitalsignalintoanalogsignaland vice- 1
versa.
A.Modulator
B.B)Modem
C.Mixture
D.Multiplexer
Page2of75
B.break
C.stop
D.infinite
14 The data types CHAR (n) and VARCHAR (n) are used to create 1
and length types of string/text fields in a database.
A.Fixed, Variable
B.Equal,Variable
C.Fixed, Equal
D.Variable,Equal
15 isastandardmailprotocolusedtoreceiveemailsfromaremoteserver to a 1
local email client.
A.SMTP
B.POP
C.HTTP
D.FTP
16 Howdoyouchangethefileposition toanoffsetvaluefromthestart? 1
A.fp.seek(offset,0)
B.fp.seek(offset,1)
C.fp.seek(offset,2)
D.noneof the mentioned
Q17and18areASSERTIONANDREASONINGbasedquestions.Markthe correct
choice as
A. BothAand Raretrue andR isthecorrectexplanationfor A
B. BothAand Raretrueand Risnot thecorrect explanationfor A
C. Ais Truebut R is False
D. Ais false butR is True
17 Assertion:Thefunctionheader‘defread(a=2,b=5,c):’isnotcorrect. Reason: 1
Non default arguments can’t follow default arguments.
18 a=(1,2,3) 1
a[0]=4
Assertion(A):Theabovecodewillresultinerror
Reason(R): a is a list, So we can change it.
T1[2][1]=3.5
print(T1)
Q-17 and Q-18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False &
(d) A is False but R is True
Q17. Assertion(A): Dictionary is an unordered collection of data values that stores the key: value pair.
Reason(R): Immutable means they cannot be changed after creation.
Q18. Assertion(A): Access mode ‘a’ opens a file for appending content at the end of the file.
Reason(R): The file pointer is at the end of the file if the file exists and opens in write mode.
10 What possible outputs are expected to be displayed on the screen at the time of 1
execution of the program from the following code?
import random
temp=[10,20,30,40,50,60]
c=random.randint(0,4)for
I in range(0, c):
print(temp[i],”#”)
a) 10#20# b) 10#20#30#40#50#
c) 10#20#30# d) 50#60#
SECTION - A
1 State True or False 1
“If a loop terminates using break statement, loop else will not execute”
2 BETWEEN clause in MySQL cannot be used for 1
a) Integer Fields b) Varchar fields
c) Date Fields d) None of these
3 What will be the output of the following code snippet? 1
a=10
b=20
c=-5
a,b,a = a+c,b-c,b+c
print(a,b,c)
a) 5 25 -5 b) 5 25 25
c) 15 25 -5 d) 5 25 15
4 What is the result of the following code in python? 1
S="ComputerExam"
print(S[2]+S[-4]+S[1:-7])
a) mEomput b) mEompu
c) MCompu d) mEerExam
5 command is used to add a new column in an existing table in MySQL? 1
6 The IP (Internet Protocol) of TCP/IP transmits packets over Internet using _ 1
switching.
a) Circuit b) Message
c) Packet d) All of the above
7 Consider a list L = [5, 10, 15, 20], which of the following will result in an error. 1
a) L[0] += 3 b) L += 3 c) L *= 3 d) L[1] = 45
8 Which of the following is not true about dictionary ? 1
a) More than one key is not allowed
b) Keys must be immutable
Page 1 of 8
c) Values must be immutable
d) When duplicate keys encountered, the last assignment wins
9 Which of the following statements 1 to 4 will give the same output? 1
tup = (1,2,3,4,5)
print(tup[:-1]) #Statement 1
print(tup[0:5]) #Statement 2
print(tup[0:4]) #Statement 3
print(tup[-4:]) #Statement 4
a) Statements 1 and 2 b) Statements 2 and 4
c) Statements 2 and 5 d) Statements 1 and 3
10 What possible outputs(s) will be obtained when the following code is 1
executed?
import random
VALUES = [10, 20, 30, 40, 50, 60, 70, 80]
BEGIN = random.randint(1,3)
LAST = random.randint(BEGIN, 4)
for x in range(BEGIN, LAST+1):
print(VALUES[x], end = "-")
a) 30-40-50- b) 10-20-30-40-
c) 30-40-50-60- d) 30-40-50-60-70-
11 Which of the following command is used to move the file pointer 2 bytes ahead from the 1
current position in the file stream named fp?
a) fp.seek(2, 1) b) fp.seek(-2, 0)
c) fp.seek(-2, 2) d) fp.seek(2, -2)
12 Predict the output of the following code: 1
def ChangeLists(M , N):
M[0] = 100
N = [2, 3]
L1 = [-1, -2]
L2 = [10, 20]
ChangeLists(L1, L2)
print(L1[0],"#", L2[0])
a) -1 # 10 b) 100 # 10
c) 100 # 2 c) -1 # 2
13 Which of the following is not a function of csv module? 1
a) readline() b) writerow()
c) reader() d) writer()
14 State True or False 1
“A table in RDBMS can have more than one Primary Keys”
15 COUNT(*) function in MySQL counts the total number of in a table. 1
a) Rows b) Columns
c) Null values of column d) Null values of a row
16 Which of the following is not a method for fetching records from MySQL table using Python 1
interface?
a) fetchone() b) fetchrows()
c) fetchall() d) fetchmany()
Page 2 of 8
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice
as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17 Assertion (A):- Text file stores information in ASCII or UNICODE characters. 1
Reasoning (R):- In text file there is no delimiter(EOL) for a line.
18 Assertion (A):- HAVING clause is used with aggregate functions in SQL. 1
Reasoning (R):- WHERE clause places condition on individual rows.
SECTION
A
1. State True or False 1
“Python has a set of keywords that can also be used to declare variables”
2. Which of the following is not a valid python operator? 1
a) % b) in c) # d) **
3. What will be the output of the following python dictionary operation? 1
data = {'A':2000, 'B':2500, 'C':3000, 'A':4000}
print(data)
a) {'A':2000, 'B':2500, 'C':3000, 'A':4000}
b) {'A':2000, 'B':2500, 'C':3000}
c) {'A':4000, 'B':2500, 'C':3000}
d) It will generate an error.
4. 1
print(True or not True and False)
Choose one option from the following that will be the correct output after
executing the above python expression.
a) False b) True c) or d) not
1|P age
d) ('My ', ' is ', ' for you')
6. Which of the file opening mode will open the file for reading and writing in 1
binary mode.
a) rb b) rb+ c) wb d) a+
1
SECTION A
1. Fill in the Blank 1
The explicit conversion of an operand to a specific type is called
(a)Type casting (b) coercion (c) translation (d) None of these
2. Which of the following is not a core data type in Python?(a)Lists 1
(b) Dictionaries (c)Tuple (d) Class
3. What will the following code do? 1
dict={"Exam":"AISSCE", "Year":2022}
dict.update({"Year”:2023} )
2
11 The correct syntax of seek() is:
(a) file_object.seek(offset [, reference_point]) (b) seek(offset [,
reference_point])
(c) seek(offset, file_object) (d)
seek.file_object(offset)
12. Fill in the blank: 1
All tuples in the relation are assigned NULL as the value for the new Attribute,with the
Command
(a) MODIFY (b) TAILOR (c)ELIMINATE (d) ALTER
13. What is the size of IPv4 address? 1
(a)32 bits (b) 64 bits (c) 64 bytes (d) 32 bytes
14. What will be the output of the following expression?24//6%3 , 1
24//4//2 , 48//3//4
a)(1,3,4) b)(0,3,4) c)(1,12,Error) d)(1,3,#error)
15. Which of the following ignores the NULL values inSQL? 1
a) Count(*) b) count() c)total(*) d)None of these
16. Which of the following is not a legal method for fetching records from a database from within aPython 1
program?
(a) fetchone() b)fetchtwo() (c) fetchall() (d) fetchmany()
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False (d) A is false but R is True
17. Assertion (A):- If the arguments in a function call statement match the number and order of arguments as 1
defined in the function definition, such arguments are called positional arguments.
Reasoning (R):- During a function call, the argument list first contains default argument(s)followed by
positional argument(s).
18. Assertion (A): CSV (Comma Separated Values) is a file format for data storage which looks like atext file. 1
Reason (R): The information is organized with one record on each line and each field is separatedby comma.
SECTION – A
1. State True or False
1
“Python language is Cross platform language.”
2. Which of the following is an invalid identifier in Python? 1
(a) Max_marks (b) Max–marks (c) Maxmarks (d) _Max_Marks
3. Predict the output. 1
marks = {"Ashok":98.6, "Ramesh":95.5}
print(list(marks.keys()))
16. Which of the following function is used to established connection between Python andMySQL 1
database –
(a) connection() (b) connect() (c) Connect() (d) None
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Assertion (A): A binary file stores the data in the same way as as stored in the memory. 1
17.
Reason (R): Binary file in python does not have line delimiter.
Assertion (A):- If the arguments in a function call statement match the number and order of
arguments as defined in the function definition, such arguments are called positional
18. arguments. 1
Reasoning (R):- During a function call, the argument list first contains default
argument(s) followed by positional argument(s).
SECTIONA
1 Findtheinvalididentifierfromthefollowing 1
a) Marks@12 b)string_12 c)_bonus d)First_Name
2 IdentifythevaliddeclarationofRec: Rec=(1,‟Ashoka",50000) 1
a) List b) Tuple c)String d) Dictionary
SECTION A
1. Identify the incorrect variable name: (1)
a) int b) float c) while d) true
2. What will be the data type of of the expression 12/5==0? (1)
a) True b) False c) bool d) float
3. What will be output of the following code: (1)
d1={1:2,3:4,5:6}
d2=d1.get(3,5)
print(d2)
a) 3 b) 4 c) 5 d) Error
1
9. Select the correct output of the code: (1)
a = "assistance"
a = a.partition('a')
b = a[0] + "-" + a[1] + "-" + a[2]
print (b)
a) -a-ssistance b) -a-ssist-nce
c) a-ssist-nce d) -a-ssist-ance
0. Which of the following statement(s) would give an error during execution? (1)
S=("CBSE") # Statement 1
S+="Delhi" # Statement 2
S[0]= '@' # Statement 3
S=S+"Thank you" # Statement 4
a) Statement 1 b) Statement 2 c) Statement 3 d) Statement 4
3. Which protocol is used for transferring files over a TCP/IP network? (1)
a) FTP b) SMTP c) PPP d) HTTP
4. What will the following expression be evaluated to in Python? (1)
27 % 7 // (3 / 2)
a) 2 b) 2.0 c) 4.0 d) 4
5. Which function cannot be used with string type data? (1)
a) min() b) max() c) count() d) sum()
6. In context of Python - Database connectivity, the function fetchmany()is amethod of (1)
which object?
a) connection b) database c) cursor d) query
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct
choice as
a) Both A and R are true and R is the correct explanation for A
b) Both A and R are true and R is not the correct explanation for
c) A is True but R is False
d) A is false but R is True
7. Assertion (A):- print(f1())is a valid statement even if the function f1() (1)
has no return statement.
Reasoning (R):- A function always returns a value even if it has no return
statement.
8. Assertion (A): If L is a list, then L+=range(5)is an invalid statement.Reason (R): Only (1)
a list can be concatenated to a list.
Page 1 of 9
SECTION A
1 Identify the invalid Python statement from the following. 1
(a) _b=1 (b) b1= 1 (c) b_=1 (d) 1 = _b
3 If Statement in Python is 1
(a) looping statement (b) selection statement (c) iterative (d) sequential
6 Consider the string state = “Jharkhand”. Identify the appropriate statement that will display the last 1
five characters of the string state?
(a) state [-5:] (b) state [4:] (c) state [:4] (d) state [:-4]
if not False:
print(10)
else:
print(20)
Page 2 of 9
(a) 10 (b) 20 (c) True (d) False
(a) file pointer will move 10 byte in forward direction from beginning of the file
(b) file pointer will move 10 byte in forward direction from end of the file
(c) file pointer will move 10 byte in forward direction from current location
(d) file pointer will move 10 byte in backward direction from current location
10 Identify the device on the network which is responsible for forwarding data from one device to 1
another
11 A table has initially 5 columns and 8 rows. Consider the following sequence of operations 1
performed on the table –
i. 8 rows are added
ii. 2 columns are added
iii. 3 rows are deleted
iv. 1 column is added
What will be the cardinality and degree of the table at the end of above operations?
14 Which of the following clause is used to remove the duplicating rows from a select statement? 1
15 How do you change the file position to an offset value from the start? 1
(a) fp.seek(offset, 0) (b) fp.seek(offset, 1) (c) fp.seek(offset, 2) (d) None of them
16 Which of the following method is used to create a connection between the MySQL database and 1
Python?
(a) connector ( ) (b) connect ( ) (c) con ( ) (d) cont ( )
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Page 3 of 9
7 Assertion (A): The function definition calculate(a, b, c=1,d) will give error. 1
Reason (R): All the non-default arguments must precede the default arguments.
8 Assertion (A): CSV files are used to store the data generated by various social media platforms. 1
Reason (R): CSV file can be opened with MS Excel.
Section – A
Q01. State True or False (1)
“Tuple is datatype in Python which contain data in key-value pair.”
3. Write the importance of passing file mode while declaring a file object in 1
data file handling.
4. Find the operator which cannot be used with a string in Python from the 1
following:
(a) + (b) in (c) * (d) //
5. Write the output of the following python statements: 1
Page No. 1
Identify the invalid statement(s) from the given below statements:
1. S=DAYS[1]
2. print(DAYS[2])
3. DAYS[0]=”WED”
4. LIST=list(DAYS)
7. Declare a dictionary in python named QUAD having Keys(1,2,3,4) and 1
Values(“India”,”USA”,”Japan”,”Australia”)
8. _ is a collection of similar modules or packages that are used to 1
fulfills some functional requirement for a specific type of application.
9. Website incharge KABIR of a school is handling 1
downloading/uploading various files on school website. Write the name
of the protocol which is being used in the above activity.
10. What is its use of Data encryption in a network communication? 1
11. In SQL, write the name of the aggregate function which is used to 1
calculate & display the average of numeric values in an attribute of a
relation.
12. Write an SQL query to display all the attributes of a relation named 1
“TEST” along with their description.
13. What is the use of LIKE keyword in SQL? 1
14. Which of the following is NOT a DML command? 1
1. SELECT 2. DELETE 3. UPDATE 4. DROP
15. Give the full form of the following: 1
(a) URL (b) TDMA
16. Identify the output of the following python statements if there is no 1
error. Otherwise, identify the error(s):
Page No. 2
2 WhichoneisvalidrelationaloperatorinPython 1
i. /
ii. =
iii. ==
iv. and
3 Whichofthefollowingcanbeusedasvalidvariableidentifiersin Python? 1
i) 4thSum
ii) Total
iii) Number#
iv) _Data
4 Identifythemutabledatatypes? 1
(i) List
(ii) Tuple
(iii) Dictionary
(iv) String
5 Whatisthelengthofthetupleshownbelow? 1
t=(((('a',1),'b','c'),'d',2),'e',3)
6 Anon-keyattribute,whosevaluesarederivedfromprimarykeyofsome other table. 1
i. AlternateKey
ii. ForeignKey
iii. Primary Key
iv. CandidateKey
7 WhatisTelnet? 1
8 StatewhetherthefollowingstatementsisTrueorFalse. 1
Whentwoentitiesare communicatinganddonotwantathirdpartytolisten, this
situation is defined as secure communication.
9 Expandtheterm 1
i. XML
ii. SMS
10 Nametwowebscriptinglanguages. 1
11 Whatistheoutputofthebelow program? 1
defsay(message,times=1):
print(message * times)
say('Hello')
say('World',5)
12 Namethepythonlibraryneedtobeimportedtoinvokefollowingfunction 1
i. sqrt()
ii. randint()
13 WriteaPythonDictionarynamedclassstudentwithkeys12101,12102,12103 1
andcorrespondingvaluesas‘Rahul’,’Ravi’,’Mahesh’respectively
14 IdentifytheDDL Command. 1
(i) Insertintocommand
(ii) Createtable command
(iii) DroptableCommand
(iv) Deletecommand
Page No. 3
15 t1=(2,3,4,5,6) 1
print(t1.index(4)) output
is
i. 4
ii. 5
iii. 6
iv. 2
16 WhichclauseisusedwithaSELECTcommandinSQLtodisplaytherecordsin 1
ascendingorderofan attribute?
17 Whichoftheseisnotanexampleofunguidedmedia? 1
(i)OpticalFibreCable(ii)Radiowave(iii)Bluetooth(iv)Satellite
18 Arelationhas45tuples&5attributes,whatwillbetheDegree&Cardinality of that 1
relation?
i. Degree5,Cardinality45
ii. Degree45,Cardinality5
iii. Degree50,Cardinality45
iv. Degree50,Cardinality2250
19 InSQL,whichaggregatefunctionisusedtocountallrecordsof atable? 1
Page 2 of 10
(iv) Day={1’monday’,2’tuesday’,3’wednesday’]
5 Call the given function using KEYWORD ARGUMENT with values 100 and200 1
def Swap(num1,num2):
num1,num2=num2,num1
print(num1,num2)
Page 3 of 10
i) or ii) distinct iii) any iv)unique
19 Which clause is used in query to place the condition on groups in MySql? 1
i) where ii) having iii) group by iv) none of the above
20 Which command is used for counting the number of rows in a database? 1
i) row ii) count iii) rowcount iv) row_count
21 A Resultset is an object that is returned when a cursor object is used to query a 1
table. True/False
PART – A
SECTION–I
Selectthemostappropriateoptionoutoftheoptionsgivenforeachquestion. Attempt any 15
questions from question no 1 to 21.
1. WhichofthefollowingisnotavalididentifierinPython? 1
a) KV2 b)_main c)Hello_Dear1 d)7Sisters
2. Avariablecreatedordefinedinafunctionbodyisknownas… 1
a) local b)global c)built-in d)instance
3. Supposelist1 =[0.5*xforxin range(0,4)],list1 is 1
a) [0,1,2,3] b)[0,1,2,3,4]
c)[0.0,0.5,1.0,1.5] d)[0.0,0.5,1.0,1.5,2.0]
4. Whichstatementisnotcorrect 1
Page 4 of 10
a) Thestatementx=x+10isavalidstatement
b) List slice isalistitself.
c) Listsareimmutablewhilestringsaremutable.
d) Listsandstringsinpythonssupporttwowayindexing.
5. Whatwillbetheoutputoffollowingcodesnippet: 1
msg=“HelloFriends”
msg [ : : -1]
8. Whatwillbeoutputoffollowing: 1
d={1 : “SUM”,2:“DIFF”,3:“PROD”}
for i in d:
print (i)
a) 1 b) SUM c) 1 d) 3
2 DIFF SUM SUM
3 PROD 2 3
DIFF DIFF
3 3
PROD PROD
9. Whatwillbeoutputoffollowingcode: 1
X = 50
def funct(X):
X=2
funct(X)
print(„Xisnow:„,X)
P
A
R
T
2|Pag
e
tiSection – I
Select the most appropriate option out of the options given for each
question. Attempt any
S 15 questions from question no. 1 to 21.
e
c
1 Which of the following is not a valid identifier name in Python? Justify reason 1
for it not being a valid name.
a) 5Total b) _Radius c) pie d)While
2 Find the output - 1
>>>A = [17, 24, 15, 30]
>>>A.insert( 2, 33)
>>>print ( A [-4])
3 Name the Python Library modules which need to be imported to invoke the 1
following functions:
(i) ceil() (ii) randrange()
4 Which of the following are valid operator in Python: 1
(i) */ (ii) is (iii) ^ (iv) like
3|Pag
e
5 Which of the following statements will create a tuple ? 1
(a) Tp1 = (“a”, “b”)
(b) Tp1= (3) * 3
(c) Tp1[2] = (“a”, “b”)
(d) None of these
6 What will be the result of the following code? 1
>>>d1 = {“abc” : 5, “def” : 6, “ghi” : 7}
>>>print (d1[0])
(a) abc (b) 5 (c) {“abc”:5} (d) Error
7 Find the output of the following: 1
>>>S = 1, (2,3,4), 5, (6,7)
>>> len(S)
8 Which of the following are Keywords in Python ? 1
(i) break (ii) check (iii) range (iv) while
9 is a specific condition in a network when more data packets are 1
coming to network device than they can handle and process at a time.
10 Ravi received a mail from IRS department on clicking “Click –Here”, he was 1
taken to a site designed to imitate an official looking website, such asIRS.gov. He uploaded some
important information on it.
Identify and explain the cybercrime being discussed in the above scenario.
11 Which command is used to change the number of columns in a table? 1
12 Which keyword is used to select rows containing column that match a 1
wildcard pattern?
13 The name of the current working directory can be determined using 1
method.
14 Differentiate between Degree and Cardinality. 1
15 Give one example of each – Guided media and Unguided media 1
16 Which of the following statement create a dictionary? 1
a) d = { }
b) d = {“john”:40, “peter”:45}
c) d = (40 : “john”, 45 : “peter”}
d) d = All of the mentioned above
4|Pag
e
17 Find the output of the following: 1
>>>Name = “Python Examination”
>>>print (Name [ : 8 : -1])
18 All aggregate functions except ignore null values in their input 1
collection.
a) Count (attribute) b) Count (*) c) Avg () d) Sum ()
19 Write the expand form of Wi-Max. 1
20 Group functions can be applied to any numeric values, some text types and 1
Section-I
Select the most appropriate option out of the options given for each question.
Attempt any 15 questions from question no 1 to 21.
print(Lst[3:6])
3 ………………….. function of writer object is used to send data to csv file to store. 1
Page 1 of 9
(ii) each of the keys within a dictionary must be unique
Rec=(1,‟Vikrant”,50000)
10 Raj is a social worker, one day he noticed someone has created his fake ID on 1
social media platforms for fund raising. What kind of Cybercrime Raj is facing?
13 Write an Aggregate function that is used in MySQL to find No. of Rows in the 1
database Table.
14 For each attribute of a relation, there is a set of permitted values, called the ………. 1
of that attribute.
a. Dictionaries
b. Domain
c. Directory
d. Relation
15 Name the Transmission media which consists of an inner copper core and a second 1
conducting outer sheath.
16 Identify the valid statement for list L=[1,2,”a”]: 1
a. L.remove("2")
b. L.del(2)
c. del L[2]
d. del L[“a”]
17 Find and write the output of the following python code:x 1
= "Python"
print(x[ : :-1])
print(x)
18 In SQL, write the query to display the list of databases stored in MySQL. 1
Page 2 of 9
a. Unique
b. Distinct
c. Primary key
d. Check
21 Define Bandwidth? 1
Page 3 of 9
4 Identify mutable and immutable objects from the following: 1
i. List ii. String iii. Dictionary iv. Tuple
5 Suppose a tuple T is declared as T = (10, 12, 43, 39), which of the 1
following is incorrect?
a) print(T[1])
b) T[2] = -29
c) print(max(T))
d) print(len(T))
14 To select the record with the smallest value of the Price column. 1
SELECT FROM Products;
Page 4 of 9
21 Rearrange the following terms in increasing order of data transfer 1
rates. Gbps, Mbps, Tbps, Kbps, bps
Page 5 of 9
ii. +=
iii. !=
iv. =
8 Consider a list List=[10,20,30,40], which of the following statement will result in an 1
error:
i) L[0]=L[0]+2
ii) L=L+2
iii) L=L*2
iv) L[1]=50
9 Which Switching Technique establishes a dedicated path between sender and 1
receiver?
10 Which software program helps website to store the information about visitors like 1
user name, password and other details?
11 If the following codes are executed, what will be the answer: 1
21 WhatisHTML? 1
5 Ifd={1:”First”,2:”Second”,3:”Third”} Write
1
a command to display [1,2,3]
6 Anon-keyattribute,whosevaluesarederivedfromprimarykeyofsomeothertable.
(a)Alternate Key
(b)Foreign Key 1
(c)Primary Key
(d)CandidateKey
7 Nameanytwowirelessmobilecommunication protocols. 1
8 RJ45connectorcanbeusedtoconnect
(a)TwistedPairCable (b)OpticalFiber 1
(c)CoaxialCable (d)Radio communication
9 Whyhttpsisconsideredmoresecured? 1
10 Statetrue orfalse.
(a) XMLhaspre-definedtags. 1
(b) HTMLisacase-sensitivelanguage.
1 of 75
11 Findtheoutputof
X = 50
deffunct(X):
1
X=2
funct(X)
print(“Xisnow:”X)
12 State(True/False)
(a) ‘Having’clausegivesconditiononrows. 1
(b) count(columnname)andcount(*)wouldalwaysgivesame result.
13 Atablehas5attributesand7tuples.Whatisitsdegreeand cardinality? 1
14 Riju wanted to find the date of birth of the youngest student from a table. Suggest a n
1
aggregate function in SQL to find the youngest student.
15 Nametheattackthatencryptsthefilesanddemandsmoneyfordecryptionofthefile. 1
16 Considerthefollowingstatement. 1
Dict={“Teena”:18,”Riya”:12,“Aliya”:22}
2 of 75
Howwillyouremove“Riya”from Dict?
17 Identifythedatatypeandwriteifitismutable/immutable.
1
(a)(‘a’,’e’,’I’,’o’,’u’)
18 WhichkeywordofSQLisusedtoselectuniquevaluesfromacolumn? 1
19 The traditional telephone system follows switching
1
technique.
20 WritethefullformofDMLandDDL. 1
21 A canreplicateitselfwithoutanyhumaninteraction,andit
doesnotneedtoattachitselftoasoftwareprograminordertocausedamageto computer. 1
Section I
Select the most appropriate option out of the options given for each question. Attempt any 15
questions from question no 1 to 21.
1 Find the valid identifier from the following 1
a) My-Name b) True c) 2ndName d) S_name
2 Given the lists L=[1,3,6,82,5,7,11,92] , 1
What will be the output of
print(L[2:5])
3 Write the full form of IDLE. 1
4 Identify the valid logical operator in Python from the following. 1
a) ? b) < c) ** d) and
5 Suppose a tuple Tup is declared as Tup = (12, 15, 63, 80), which 1
of the following is incorrect?
a) print(Tup[1])
b) Tup[2] = 90
c) print(min(Tup))
d) print(len(Tup))
6 Write a statement in Python to declare a dictionary whose keys are 1,2,3 and values are Apple, Mango 1
and Banana respectively.
7 A tuple is declared as T = (2,5,6,9,8) 1
Page 1 of 6
What will be the value of sum(T)?
8 Name the built-in mathematical function / method that is used to return square root of a number. 1
9 Protocol is used to send email ……………………………… 1
10 Your friend Sunita complaints that somebody has created a fake profile on Twitter and defaming her 1
character with abusive comments and pictures. Identify the type of cybercrime for these situations.
11 In SQL, name the command/clause that is used to display the rows in descending order of a column. 1
12 In SQL, what is the error in following query : 1
SELECT NAME, SAL, DESIGNATION WHERE DISCOUNT=NULL;
13 Write any two aggregate functions used in SQL. 1
14 Which of the following is a DML command? 1
a) SELECT b) Update c) INSERT d) All
15 Name the transmission media best suitable for connecting to desert areas. 1
16 Identify the valid declaration of P: 1
P= [‘Jan’, 31, ‘Feb’, 28]
a. dictionary b. string c.tuple d. list
17 If the following code is executed, what will be the output of the following code? 1
str="KendriyaVidyalayaSangathan"
print(str[8:16])
18 In SQL, write the query to display the list of databases. 1
19 Write the expanded form of VPN. 1
20 Which of the following will suppress the entry of duplicate value in a column? 1
a) Unique b) Distinct c) Primary Key d) NOT NULL
21 Rearrange the following terms in increasing order of speedy medium of data transfer. 1
Telephone line, Fiber Optics, Coaxial Cable, Twisted Paired Cable
Section-I
Select the most appropriate option out of the options given for
eachquestion.Attemptany15questionsfromquestionno1to
21.
1 Findthevalididentifierfromthefollowing 1
a. 12myschool
b. Class_
c. My*school
d. Myschool123
2 Whatwillbetheoutputofthefollowing? a=[1,2,3] 1
b=[2,3]
c=2
a.extend(b)
print(a)
a.append(c)
print(a)
Page 2 of 6
3 Rearrangethefollowingtermsinincreasingorderofdata transfer 1
rates.
Gbps,Mbps,Tbps,Kbps,Bps
4 WhichofthefollowingisavalidExponentiationoperatorin Python? 1
a. //
b. %
c. **
d. /
5 Consideratuple 1
T=(1,2,3)
Takeaninteger‘n’fromuserandaddinteger‘n’tothetuple. For eg if
n=12.
ThenafterexecutionofstatementT=(1,2,3,12)
6 Write a statement in Python to declare a dictionary with keys as1 1
2 and 3 and values as “Monday”, ”Tuesday”, ”Wednesday”. After
declaring ,write statements to print the key and value inthe
following format
1 ..... Monday
2 ..... Tuesday
3 ..... Wednesday
7 Atupleisdeclaredas T 1
= (2,5,6,9,8)
Writeastatementtodeletethe tuple.
8 Namethebuilt-inmathematicalfunction/methodthatisused to 1
return the remainder of x/y
9 NametheprotocoloftenusedforDialUpconnections? 1
10 Copyinginformationfromawebsiteorprintedmaterialand 1
pretendingitis yours is anexampleof ?
Page 3 of 6
11 The operatorisashorthandformultiple OR 1
conditionsinSQL.
12 The statementisusedtomodifytheexisting 1
recordsinatableinSQL.
13 Except for aggregatefunction,allother 1
aggregatefunctionsignorenullvalues
14 WhichofthefollowingareDMLcommands? 1
a)INSERTb)ALTERc)CREATEd)UPDATE
15 Nameanytwowirelesstransmissionmedia? 1
16 Consider the following list 1
n_list=["Happy",[2,0,1,5]]
Writeapythonstatementtoprint2fromthenested list.
17 Ifthefollowingcodeisexecuted,whatwillbetheoutputofthe 1
following code?
String='ASTRING'
print(String[1:5:2])
18 Using commandinSQLweareabletosee 1
thestructureofatable.
19 Writetheexpandedformof WiMax. 1
20 The constraintinSQLspecifiesthatthe 1
column cannot have NULL or empty values in table.
21 filemodeopensafileforreadingonlyin 1
binaryformat.