Xii - Cs em One Mark 2024-2025
Xii - Cs em One Mark 2024-2025
https://csknowledgeopener.com 2 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
43. Which of the following shortcut is used to create new Python Program ?
A) Ctrl + C B) Ctrl + F C) Ctrl + B D) Ctrl + N
44. Which of the following character is used to give comments in Python Program ?
A) # B) & C) @ D) $
45. This symbol is used to print more than one item on a single line.
A) Semicolon(;) B) Dollor($) C) comma(,) D) Colon(:)
46. Which of the following is not a token ?
A) Interpreter B) Identifiers C) Keyword D) Operators
47. Which of the following is not a Keyword in Python ?
A) break B) while C) continue D) operators
48. Which operator is also called as Comparative operator?
A) Arithmetic B) Relational C) Logical D) Assignment
49. Which of the following is not Logical operator?
A) and B) or C) not D) Assignment
50. Which operator is also called as Conditional operator?
A) Ternary B) Relational C) Logical D) Assignment
51. How many important control structures are there in Python?
A) 3 B) 4 C) 5 D) 6
52. elif can be considered to be abbreviation of
A) nested if B) if..else C) else if D) if..elif
53. What plays a vital role in Python programming?
A) Statements B) Control C) Structure D) Indentation
54. Which statement is generally used as a placeholder?
A) continue B) break C) pass D) goto
55. The condition in the if statement should be in the form of
A) Arithmetic or Relational expression B) Arithmetic or Logical expression
C) Relational or Logical expression D) Arithmetic
56. Which of the following is known as definite loop?
A) do..while B) while C) for D) if..elif
57. What is the output of the following snippet?
i=1
while True:
if i%3 ==0:
break
print(i,end='')
i +=1
A) 1 2 B) 123 C) 1234 D) 124
58. What is the output of the following snippet?
T=1
while T:
print(True)
break
A) False B) True C) 0 D) no output
59. Which amongst this is not a jump statement ?
A) for B) goto C) continue D) break
60. Which punctuation should be used in the blank?
if <condition>_
statements-block 1
else:
statements-block 2
A) ; B) : C) :: D) !
https://csknowledgeopener.com 3 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
61. A named blocks of code that are designed to do one specific job is called as
(a) Loop (b) Branching (c) Function (d) Block
62. A Function which calls itself is called as
(a) Built-in (b) Recursion (c) Lambda (d) return
63. Which function is called anonymous un-named function
(a) Lambda (b) Recursion (c) Function (d) define
64. Which of the following keyword is used to begin the function block?
(a) define (b) for (c) finally (d) def
65. Which of the following keyword is used to exit a function block?
(a) define (b) return (c) finally (d) def
66. While defining a function which of the following symbol is used.
(a) ; (semicolon) (b) . (dot) (c) : (colon) (d) $ (dollar)
67. In which arguments the correct positional order is passed to a function?
(a) Required (b) Keyword (c) Default (d) Variable-length
68. Read the following statement and choose the correct statement(s).
(I) In Python, you don’t have to mention the specific data types while defining function.
(II) Python keywords can be used as function name.
(a) I is correct and II is wrong
(b) Both are correct
(c) I is wrong and II is correct
(d) Both are wrong
69. Pick the correct one to execute the given statement successfully.
if ____ : print(x, " is a leap year")
(a) x%2=0 (b) x%4==0 (c) x/4=0 (d) x%4=0
70. Which of the following keyword is used to define the function testpython(): ?
(a) define (b) pass (c) def (d) while
71. Which of the following is the output of the following python code?
str1="TamilNadu"
print(str1[::-1])
(a) Tamilnadu (b) Tmlau (c) udanlimaT d) udaNlimaT
72. What will be the output of the following code?
str1 = "Chennai Schools"
str1[7] = "-"
(a) Chennai-Schools (b) Chenna-School (c) Type error (d) Chennai
73. Which of the following operator is used for concatenation?
(a) + (b) & (c) * (d) =
74. Defining strings within triple quotes allows creating:
(a) Single line Strings (b) Multiline Strings (c) Double line Strings (d) Multiple Strings
75. Strings in python:
(a) Changeable (b) Mutable (c) Immutable (d) flexible
76. Which of the following is the slicing operator?
(a) { } (b) [ ] (c) < > (d) ( )
77. What is stride?
(a) index value of slide operation (b) first argument of slice operation
(c) second argument of slice operation (d) third argument of slice operation
78. Which of the following formatting character is used to print exponential notation in upper case?
(a) %f (b) %E (c) %g (d) %n
79. Which of the following is used as placeholders or replacement fields which get replaced along with
format( ) function?
(a) { } (b) < > (c) ++ (d) ^^
https://csknowledgeopener.com 4 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
https://csknowledgeopener.com 5 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
https://csknowledgeopener.com 6 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
120. Which of the following module is provided by Python to do several operations on the CSV files?
(A) py (B) xls (C) csv (D) os
121. Which of the following mode is used when dealing with non-text files like image or exe files?
(A) Text mode (B) Binary mode (C) xls mode (D) csv mode
122. The command used to skip a row in a CSV file is
(A) next() (B) skip() (C) omit() (D) bounce()
123. Which of the following is a string used to terminate lines produced by writer()method of csv module?
(A) Line Terminator (B) Enter key (C) Form feed (D) Data Terminator
124. What is the output of the following program?
import csv
d=csv.reader(open('c:\PYPRG\ch13\city.csv'))
next(d)
for row in d:
print(row)
if the file called “city.csv” contain the following details
chennai,mylapore
mumbai,andheri
A) chennai,mylapore (B) mumbai,andheri
(C) chennai (D) chennai,mylapore
mumba mumbai,andheri
125. Which of the following creates an object which maps data to a dictionary?
(A) listreader() (B) reader() (C) tuplereader() (D) DictReader ()
126. Making some changes in the data of the existing file or adding more data is called
(A)Editing (B) Appending (C) Modification (D) Alteration
127. What will be written inside the file test.csv using the following program import csv
D = [['Exam'],['Quarterly'],['Halfyearly']]
csv.register_dialect('M',lineterminator = '\n')
with open('c:\pyprg\ch13\line2.csv', 'w') as f:
wr = csv.writer(f,dialect='M')
wr.writerows(D)
f.close()
(A) Exam Quarterly Halfyearly (B) Exam Quarterly Halfyearly
(C) E (D) Exam,
Q Quarterly,
H Halfyearly
https://csknowledgeopener.com 7 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
134. getopt() will return an empty array if there is no error in splitting strings to
(A) argv variable (B) opt variable (C)args variable (D) ifile variable
135. Identify the function call statement in the following snippet.
if __name__ =='__main__':
main(sys.argv[1:])
(A) main(sys.argv[1:]) (B) __name__ (C) __main__ (D) argv
136. Which of the following can be used for processing text, numbers, images, and scientific data?
(A) HTML (B) C (C) C++ (D) PYTHON
137. What does __name__ contains ?
(A) c++ filename (B) main() name (C) python filename (D) os module name
138. Which of the following is an organized collection of data?
(A) Database (B) DBMS (C) Information (D) Records
139. SQLite falls under which database system?
(A) Flat file database system (B) Relational Database system
(C) Hierarchical database system (D) Object oriented Database system
140. Which of the following is a control structure used to traverse and fetch the records of the
database?
(A) Pointer (B) Key (C) Cursor (D) Insertion point
141. Any changes made in the values of the record should be saved by the command
(A) Save (B) Save As (C) Commit (D) Oblige
142. Which of the following executes the SQL command to perform some action?
(A) Execute( ) (B) Key() (C) Cursor() (D) run()
143. Which of the following function retrieves the average of a selected column of rows in a table?
(A) Add() (B) SUM() (C) AVG( ) (D) AVERAGE()
144. The function that returns the largest value of the selected column is
(A) MAX( ) (B) LARGE() (C) HIGH() (D) MAXIMUM()
145. Which of the following is called the master table?
(A) sqlite_master (B) sql_master (C) main_master (D) master_main
146. The most commonly used statement in SQL is
(A) cursor (B) select (C) execute (D) commit
147. Which of the following clause avoide the duplicate?
(A) Distinct (B) Remove (C) Where (D) GroupBy
148. Which is a python package used for 2D graphics?
a. matplotlib.pyplot b. matplotlib.pip c. matplotlib.numpy d. matplotlib.plt
149. Identify the package manager for installing python packages, or modules.
a. Matplotlib b. PIP c. plt.show() d. python package
150. Which of the following feature is used to represent data and information graphically?
a. Data List b. Data Tuple c. Classes and Objects d. Data visualization
151. _____ is a collection of resources assembled to create a single unified visual display.
a. Interface b. Dashboard c. Objects d. Graphics
152. Which of the following modules should be imported to visualize data and information in python?
a. csv b. getopt c. mysql d. matplotlib
153. _____ is a type of chart which displays information as a series of data points connected by straight line
segments.
a. csv b. Pie chart c. Bar chart d. All the above
https://csknowledgeopener.com 8 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.
155. Identify the right type of chart using the following hints.
Hint 1: This chart is often used to visualize a trend in data over intervas of time.
Hint 2: The line in this type of chart is often drawn chronologically.
a. Line chart b. Bar chart c. Pie chart d. Scatter plot
156. Read the statements given below. Identify the right option from the following for pie chart.
Statement A: To make a pie chart with Matplotlib, we can use the plt.pie() function.
Statement B: The autopct parameter allows us to display the percentage value using the Python string
formatting.
a. Statement A is correct b. Statement B is correct
c. Both the statements are correct d. Both the statements are wrong
PREPARED BY
https://csknowledgeopener.com 9 http://www.youtube.com/c/csknowledgeopener