0% found this document useful (0 votes)
7 views9 pages

Xii - Cs em One Mark 2024-2025

This document contains a series of one-mark questions related to computer science concepts, programming, and Python language. It covers topics such as functions, data types, algorithms, control structures, and string manipulation. Each question provides multiple-choice answers, testing the reader's knowledge in these areas.

Uploaded by

perumalsri1726
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Xii - Cs em One Mark 2024-2025

This document contains a series of one-mark questions related to computer science concepts, programming, and Python language. It covers topics such as functions, data types, algorithms, control structures, and string manipulation. Each question provides multiple-choice answers, testing the reader's knowledge in these areas.

Uploaded by

perumalsri1726
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.

XII – COMPUTER SCIENCE


PRACTICE ONE MARK QUESTION
1. The small sections of code that are used to perform a particular task is called
(A) Subroutines (B) Files (C) Pseudo code (D) Modules
2. Which of the following is a unit of code that is often defined within a greater code structure?
(A) Subroutines (B) Function (C) Files (D) Modules
3. Which of the following is a distinct syntactic block?
(A) Subroutines (B) Function (C) Definition (D) Modules
4. The variables in a function definition are called as
(A) Subroutines (B) Function (C) Definition (D) Parameters
5. The values which are passed to a function definition are called
(A) Arguments (B) Subroutines (C) Function (D) Definition
6. Which of the following are mandatory to write the type annotations in the function definition?
(A) Curly braces (B) Parentheses (C) Square brackets (D) indentations
7. Which of the following defines what an object can do?
(A) Operating System (B) Compiler (C) Interface (D) Interpreter
8. Which of the following carries out the instructions defined in the interface?
(A) Operating System (B) Compiler (C) Implementation (D) Interpreter
9. The functions which will give exact result when same arguments are passed are called
(A) Impure functions (B) Partial Functions
(C) Dynamic Functions (D) Pure functions
10. The functions which cause side effects to the arguments passed are called
(A) Impure functions (B) Partial Functions
(C) Dynamic Functions (D) Pure functions
11. Which of the following functions that build the abstract data type ?
(A) Constructors (B) Destructors (C) recursive (D)Nested
12. Which of the following functions that retrieve information from the data type?
(A) Constructors (B) Selectors (C) recursive (D)Nested
13. The data structure which is a mutable ordered sequence of elements is called
(A) Built in (B) List (C) Tuple (D) Derived data
14. A sequence of immutable objects is called
(A) Built in (B) List (C) Tuple (D) Derived data
15. The data type whose representation is known are called
(A) Built in datatype (B) Derived datatype
(C) Concrete datatype (D) Abstract datatype
16. The data type whose representation is unknown are called
(A) Built in datatype (B) Derived datatype
(C) Concrete datatype (D) Abstract datatype
17. Which of the following is a compound structure?
(A) Pair (B) Triplet (C) single (D) quadrat
18. Bundling two values together into one can be considered as
(A) Pair (B) Triplet (C) single (D) quadrat
19. Which of the following allow to name the various parts of a multi-item object?
(A) Tuples (B) Lists (C) Classes (D) quadrats
20. Which of the following is constructed by placing expressions within square brackets?
(A) Tuples (B) Lists (C) Classes (D) quadrats
21. Which of the following refers to the visibility of variables in one part of a program to another part of the
same program.
(A) Scope (B) Memory (C) Address (D) Accessibility
https://csknowledgeopener.com 1 http://www.youtube.com/c/csknowledgeopener
J. ILAKKIA M.Sc., B.Ed., M.Phil. Computer Instructor Grade-I, GHSS – V.Pagandai, Villupuram.

22. The process of binding a variable name with an object is called


(A) Scope (B) Mapping (C) late binding (D) early binding
23. Which of the following is used in programming languages to map the variable and object?
(A) :: (B) := (C) = (D) ==
24. Containers for mapping names of variables to objects is called
(A) Scope (B) Mapping (C) Binding (D) Namespaces
25. Which scope refers to variables defined in current function?
(A) Local Scope (B) Global scope (C) Module scope (D) Function Scope
26. The process of subdividing a computer program into separate sub-programs is called
(A) Procedural Programming (B) Modular programming
(C)Event Driven Programming (D) Object oriented Programming
27. Which of the following security technique that regulates who can use resources in a computing
environment?
(A) Password (B)Authentication (C) Access control (D) Certification
28. Which of the following members of a class can be handled only from within the class?
(A) Public members (B)Protected members (C) Secured member (D) Private members
29. Which members are accessible from outside the class?
(A) Public members (B)Protected members (C) Secured members (D) Private members
30. The members that are accessible from within the class and are also available to its sub-classes is called
(A) Public members (B)Protected members (C) Secured members (D) Private member
31. The word comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al
Khowarizmi is called?
(A) Flowchart (B) Flow (C) Algorithm(D) Syntax
32. From the following sorting algorithms which algorithm needs the minimum number of swaps?
(A) Bubble sort (B) Insertion sort (C) Selection sort (D) All the above
33. Two main measures for the efficiency of an algorithm are
(A) Processor and memory (B) Complexity and capacity
(C) Time and space (D) Data and space
34. The algorithm that yields expected output for a valid input in called as
(A) Algorithmic Solution (B) Algorithmic outcomes
(C) Algorithmic problems (D) Algorithmic coding
35. Which of the following is used to describe the worst case of an algorithm?
(A) Big A (B) Big S (C) Big W (D) Big O
36. Big Ω is the reverse of
(A) Big O (B) Big θ (C) Big A (D) Big S
37. Binary search is also called as
(A) Linear search (B) Sequential search (C) Random search (D) Half-interval search
38. The Θ notation in asymptotic evaluation represents
(A) Base case (B) Average case (C) Worst case (D) NULL case
39. If a problem can be broken into subproblems which are reused several times, the problem possesses which
property?
(A) Overlapping subproblems (B) Optimal substructure
(C) Memoization (D) Greedy
40. In dynamic programming, the technique of storing the previously calculated values is called?
(A) Saving value property (B) Storing value property
(C) Memoization (D) Mapping
41. Who developed Python ?
A) Ritche B) Guido Van Rossum C) Bill Gates D) Sunder Pitchai
42. The Python prompt indicates that Interpreter is ready to accept instruction.
A) >>> B) <<< C) # D) <<

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.

80. The subscript of a string may be:


(a) Positive (b) Negative (c) Both (a) and (b) (d) Either (a) or (b)
81. Pick odd one in connection with collection data type
(a) List (b) Tuple (c) Dictionary (d) Loop
82. Let list1=[2,4,6,8,10], then print(List1[-2]) will result in
(a) 10 (b) 8 (c) 4 (d) 6
83. Which of the following function is used to count the number of elements in a list?
(a) count( ) (b) find( ) (c)len( ) (d) index( )
84. If List=[10,20,30,40,50] then List[2]=35 will result
(a) [35,10,20,30,40,50] (b) [10,20,30,40,50,35]
(c) [10,20,35,40,50] (d) [10,35,30,40,50]
85. If List=[17,23,41,10] then List.append(32) will result
(a) [32,17,23,41,10] (b) [17,23,41,10,32]
(c) [10,17,23,32,41] (d) [41,32,23,17,10]
86. Which of the following Python function can be used to add more than one element within an
Existing list?
(a) append() (b) append_more() (c)extend() (d) more()
87. What will be the result of the following Python code?
S=[x**2 for x in range(5)]
print(S)
(a) [0,1,2,4,5] (b) [0,1,4,9,16] (c) [0,1,4,9,16,25] (d) [1,4,9,16,25]
88. What is the use of type() function in python?
(a) To create a Tuple (b) To know the type of an element in tuple.
(c) To know the data type of python object. (d) To create a list.
89. Which of the following statement is not correct?
(a) A list is mutable
(b) A tuple is immutable.
(c) The append() function is used to add an element.
(d) The extend() function is used in tuple to add elements in a list.
90. Let setA={3,6,9}, setB={1,3,9}. What will be the result of the following snippet?
print(setA|setB)
(a) {3,6,9,1,3,9} (b) {3,9} (c) {1} (d) {1,3,6,9}
91. Which of the following set operation includes all the elements that are in two sets but not the one that are
common to two sets?
(a) Symmetric difference (b) Difference (c) Intersection (d) Union
92. The keys in Python, dictionary is specified by
(a) = (b) ; (c)+ (d) :
93. Which of the following are the key features of an Object Oriented Programming language?
(a) Constructor and Classes (b) Constructor and Object
(c) Classes and Objects (d) Constructor and Destructor
94. Functions defined inside a class:
(a) Functions (b) Module (c) Methods (d) section
95. Class members are accessed through which operator?
(a) & (b) . (c) # (d) %
96. Which of the following method is automatically executed when an object is created?
(a) __object__( ) (b) __del__( ) (c) __func__( ) (d) __init__( )
97. A private class variable is prefixed with
(a) __ (b) && (c) ## (d) **
98. Which of the following method is used as destructor?
(a) __init__( ) (b) __dest__( ) (c) __rem__( ) (d) __del__( )

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.

99. Which of the following class declaration is correct?


(a) class class_name (b) class class_name<> (c) class class_name: (d) class class_name[ ]
100. Which of the following is the output of the following program?
class Student:
def __init__(self, name):
self.name=name
S=Student(“Tamil”)
(a) Error (b) Tamil (c) name (d) self
101. Which of the following is the private class variable?
(a) __num (b) ##num (c) $$num (d) &&num
102. The process of creating an object is called as:
(a) Constructor (b) Destructor (c) Initialize (d) Instantiation
103. What is the acronym of DBMS?
a) DataBase Management Symbol b) Database Managing System
c) DataBase Management System d) DataBasic Management System
104. A table is known as
a) tuple b) attribute c) relation d)entity
105. Which database model represents parent-child relationship?
a) Relational b) Network c) Hierarchical d) Object
106. Relational database model was first proposed by
a) E F Codd b) E E Codd c) E F Cadd d) E F Codder
107. What type of relationship does hierarchical model represents?
a) one-to-one b) one-to-many c) many-to-one d) many-to-many
108. Who is called Father of Relational Database from the following?
a) Chris Date b)Hugh Darween c) Edgar Frank Codd d) Edgar Frank Cadd
109. Which of the following is an RDBMS?
a) Dbase b) Foxpro c) MS-Access d) MS-Excel
110. What symbol is used for SELECT statement?
a) σ b) Π c) X d) Ω
111. A tuple is also known as
a) table b) row c) attribute d) field
112. Who developed ER model?
a) Chen b) EF Codd c) Chend d) Chand
113. Which commands provide definitions for creating table structure, deleting relations, and modifying
relation schemas.
a. DDL b. DML c. DCL d. DQL
114. Which command lets to change the structure of the table?
a. SELECT b. ORDER BY c. MODIFY d. ALTER
115. The command to delete a table including the structure is
a. DROP b. DELETE c. DELETE ALL d. ALTER TABLE
116. Queries can be generated using
a. SELECT b. ORDER BY c. MODIFY d. ALTER
117. The clause used to sort data in a database
a. SORT BY b. ORDER BY c. GROUP BY d. SELECT
118. A CSV file is also known as a ….
(A) Flat File (B) 3D File (C) String File (D) Random File
119. The expansion of CRLF is
(A) Control Return and Line Feed (B) Carriage Return and Form Feed
(C) Control Router and Line Feed (D) Carriage Return and Line Feed

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

128. Which of the following is not a scripting language?


(A) JavaScript (B) PHP (C) Perl (D) HTML
129. Importing C++ program in a Python program is called
(A) wrapping (B) Downloading (C) Interconnecting (D) Parsing
130. The expansion of API is
(A) Application Programming Interpreter (B) Application Programming Interface
(C) Application Performing Interface (D) Application Programming Interlink
131. A framework for interfacing Python and C++ is
(A) Ctypes (B) SWIG (C) Cython (D) Boost
132. Which of the following is a software design technique to split your code into separate parts?
(A) Object oriented Programming (B) Modular programming
(C) Low Level Programming (D) Procedure oriented Programming
133. The module which allows you to interface with the Windows operating system is
(A) OS module (B) sys module (C) csv module (D) getopt module

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.

154. Read the code:


a. import matplotlib.pyplot as plt
b. plt.plot(3,2)
c. plt.show()
Identify the output for the above coding.

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

J. ILAKKIA M.Sc., B.Ed., M.Phil.


Computer Instructor Grade-I
Govt. Hr. Sec. School
V.Pagandai, Villupuram 605 501.

https://csknowledgeopener.com 9 http://www.youtube.com/c/csknowledgeopener

You might also like