CPD Oct 23 Xiics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

[Type here]

KENDRIYA VIDYALAYA DGQA CHENNAI-61


Autumn break questions for XIIA CS, under CPD-October 2023

Section – A
Q01. State True or False (1)
“Tuple is datatype in Python which contain data in key-value pair.”

Q02. Which of the following is not a keyword? (1)


(A) eval (B) assert
(C) nonlocal (D) pass

Q03. Given the following dictionaries (1)


dict_student = {"rno" : "53", "name" : ‘Rajveer Singh’}
dict_marks = {"Accts" : 87, "English" : 65}
Which statement will merge the contents of both dictionaries?
(A) dict_student + dict_marks (B) dict_student.add(dict_marks)
(C) dict_student.merge(dict_marks) (D) dict_student.update(dict_marks)
Q04. Consider the given expression: (1)
not ((True and False) or True)

Which of the following will be correct output if the given expression is evaluated?
(A) True (B) False
(C) NONE (D) NULL
Q05. Select the correct output of the code: (1)
>>> s='[email protected]'
>>> s=s.split('kv')
>>> op = s[0] + "@kv" + s[2]
>>> print(op)
(A) mail2@kvsangathan (B) mail2@sangathan.

(C) mail2@kvsangathan. (D) mail2kvsangathan.

[Type here]
[Type here]

Q06. Which functions is used to close a file in python? (1)


(A) close (B) cloose()
(C) Close() (D) close()
Q07. Fill in the blank: (1)
command is used to change table structure in SQL.
(A) update (B) change
(C) alter (D) modify
Q08. Which of the following commands will remove the entire database from MYSQL? (1)
(A) DELETE DATABASE (B) DROP DATABASE
(C) REMOVE DATABASE (D) ALTER DATABASE
Q09. Which of the following statement(s) would give an error after executing the following code? (1)
D={'rno':32,'name':'Ms Archana','subject':['hindi','english','cs'],'marks':(85,75,89)} #S1
print(D) #S2
D['subject'][2]='IP' #S3
D['marks'][2]=80 #S4
print(D) #S5
(A) S1 (B) S3
(C) S4 (D) S3 and S4
Q10. Fill in the blank: (1)
is a non-key attribute, whose values are derived from the primary key of some other table.
(A) Primary Key (B) Candidate Key
(C) Foreign Key (D) Alternate Key

Q11. Write a program that replaces all “the” with “them” in a file data.txt

Q12. Write a program that replaces a given character by another given character in a file data.txt

[Type here]

You might also like