Font size
Worksheets12th Computer Science State board One Mark Quiz
Total questions: 156
Worksheet time: 1hrs 18mins
The small sections of code that are used to perform a particular task is called
Subroutines
Files
Pseudo code
Modules
Which of the following is a unit of code that is often defined within a greater code structure?
Subroutines
Function
Files
Modules
Which of the following is a distinct syntactic block?
Subroutines
Function
Definition
Modules
The variables in a function definition are called as
Subroutines
Function
Definition
Parameters
The values which are passed to a function definition are called
Arguments
Subroutines
Function
Definition
Which of the following are mandatory to write the type annotations in the function definition?
Curly braces
Parentheses
Square brackets
indentations
Which of the following defines what an object can do?
Operating System
Compiler
Interface
Interpreter
Which of the following carries out the instructions defined in the interface?
Operating System
Implementation
Interpreter
The functions which will give exact result when same arguments are passed are called
Impure functions
Partial Functions
Dynamic Functions
Pure functions
The functions which cause side effects to the arguments passed are called
impure function
Partial Functions
Dynamic Functions
Pure functions
Which of the following functions that build the abstract data type ?
Constructors
Destructors
recursive
Nested
Which of the following functions that retrieve information from the data type?
Constructors
Selectors
recursive
Neted
The data structure which is a mutable ordered sequence of elements is called
Built in
List
Tuple
Derived data
A sequence of immutable objects is called
Built in
List
Tuple
Derived data
The data type whose representation is known are called
Built in datatype
Derived datatype
Concrete datatype
Abstract datatype
The data type whose representation is unknown are called
Built in datatype
Derived datatype
Concrete datatype
Abstract datatype
Which of the following is a compound structure?
Pair
Triplet
single
quadrat
Bundling two values together into one can be considered as
Pair
Triplet
single
quadrat
Which of the following allow to name the various parts of a multi-item object?
Tuples
Lists
Classes
quadrats
Which of the following is constructed by placing expressions within square brackets?
Tuples
Lists
Classes
quadrats
Which of the following refers to the visibility of variables in one part of a program to another part of the same program.
Scope
Memory
Address
Accessibility
The process of binding a variable name with an object is called
Scope
Mapping
late binding
early binding
Which of the following is used in programming languages to map the variable and object?
::
:=
=
==
Containers for mapping names of variables to objects is called
Scope
Mapping
Binding
Namespaces
Which scope refers to variables defined in current function?
Local Scope
Global scope
Module scope
Function scope
The process of subdividing a computer program into separate sub-programs is called
Procedural Programming
Modular programming
Event Driven Programming
Object oriented Programming
Which of the following security technique that regulates who can use resources in a computing environment?
Password
Authentication
Access control
Certification
Which of the following members of a class can be handled only from within the class?
Public members
Protected members
Secured members
Private members
Which members are accessible from outside the class?
Public members
Protected members
Secured members
Private members
The members that are accessible from within the class and are also available to its sub-classes is called
Public members
Protected members
Secured members
Private members
The word comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi is called?
Flowchart
Flow
Algorithm
Syntax
From the following sorting algorithms which algorithm needs the minimum number of swaps?
Bubble sort
Insertion sort
Selection sort
All the above
Two main measures for the efficiency of an algorithm are
Processor and memory
Complexity and capacity
Time and space
Data and space
The algorithm that yields expected output for a valid input in called as
Algorithmic solution
Algorithmic outcomes
Algorithmic problem
Algorithmic coding
Which of the following is used to describe the worst case of an algorithm?
Big A
Big S
Big W
Big O
Big Ω is the reverse of
Big O
Big θ
Big A
Big S
Binary search is also called as
Linear search
Sequential search
Random search
Half-interval search
The Θ notation in asymptotic evaluation represents
Base case
Average case
Worst case
NULL case
If a problem can be broken into sub problems which are reused several times, the problem possesses which property?
Overlapping subproblems
Optimal substructure
Memoization
Greedy
In dynamic programming, the technique of storing the previously calculated values is called ?
Saving value property
Storing value property
Memoization
Mapping
Who developed Python ?
Ritche
Guido Van Rossum
Bill Gates
Sunder Pitchai
The Python prompt indicates that Interpreter is ready to accept instruction.
>>>
<<
#
<<
Which of the following shortcut is used to create new Python Program ?
Ctrl + C
Ctrl + F
Ctrl + B
Ctrl + N
Which of the following character is used to give comments in Python Program ?
#
&
@
$
This symbol is used to print more than one item on a single line.
Semicolon(;)
Dollor($)
comma(,)
Colon(:)
Which of the following is not a token ?
Interpreter
Identifiersmn
Keyword
Operators
Which of the following is not a Keyword in Python ?
break
while
continue
operators
Which operator is also called as Comparative operator?
Arithmetic
Relational
Logical
Assignment
Which of the following is not Logical operator?
and
or
not
Assignment
Which operator is also called as Conditional operator?
Ternary
Relational
Logical
Assignment
How many important control structures are there in Python?
3
4
5
6
elif can be considered to be abbreviation of
nested if
if..els
else if
if..elif
What plays a vital role in Python programming?
Statements
Control
Structure
Indentation
Which statement is generally used as a placeholder?
continue
break
pas
goto
The condition in the if statement should be in the form of
Arithmetic or Relational expression
Arithmetic or Logical expression
Relational or Logical expression
Arithmetic
Which is the most comfortable loop?
do..while
while
for
if..elif
What is the output of the following snippet?
12
123
1234
124
Say Output
False
True
0
1
Which amongst this is not a jump statement?
for
pass
continue
break
Which punctuation should be used in the blank?
;
:
::
!
A named blocks of code that are designed to do one specific job is called as
Loop
Branching
Function
Block
A Function which calls itself is called as
Built-in
Recursion
Lambda
return
Which function is called anonymous un-named function
Lambda
Recursion
Function
define
Which of the following keyword is used to begin the function block?
define
for
finally
def
Which of the following keyword is used to exit a function block?
define
return
finally
def
While defining a function which of the following symbol is used.
;
(semicolon)
:
(colon)
$ (dollar)
In which arguments the correct positional order is passed to a function?
Required
Keyword
Default
Variable-length
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.
I is correct and II is wrong
Both are correct
I is wrong and II is correct
Both are wrong
Pick the correct one to execute the given statement successfully. if ____ : print(x, " is a leap year")
x%2=0
x%4==0
x/4=0
x%4=0
Which of the following keyword is used to define the function testpython(): ?
define
pass
def
while
Which of the following is the output of the following python code?
str1="TamilNadu"
print(str1[::-1])
Tamilnadu
Tmlau
udanlimaT
udaNlimaT
What will be the output of the following code?
str1 = "Chennai Schools"
str1[7] = "-"
Chennai-Schools
Chenna-School
Type error
Chennai
Which of the following operator is used for concatenation?
+
&
*
=
Defining strings within triple quotes allows creating:
Single line Strings
Multiline Strings
Double line Strings
Multiple Strings
Strings in python:
Changeable
Mutable
Immutable
flexible
Which of the following is the slicing operator?
{ }
[ ]
< >
( )
What is stride?
index value of slide operation
first argument of slice operation
second argument of slice operation
third argument of slice operation
Which of the following formatting character is used to print exponential notation in upper case?
%e
%E
%g
%n
Which of the following is used as placeholders or replacement fields which get replaced along with format( ) function?
{ }
< >
++
^^
The subscript of a string may be:
Positive
Negative
Both (a) and (b)
Either (a) or (b)
Pick odd one in connection with collection data type
List
Tuple
Dictionary
Loop
Let list1=[2,4,6,8,10], then print(List1[-2]) will result in
10
8
4
6
Which of the following function is used to count the number of elements in a list?
count()
find()
len()
index()
If List=[10,20,30,40,50] then List[2]=35 will result
[35,10,20,30,40,50]
[10,20,30,40,50,35]
[10,20,35,40,50]
[10,35,30,40,50]
If List=[17,23,41,10] then List.append(32) will result
[32,17,23,41,10]
[17,23,41,10,32]
[10,17,23,32,41]
[41,32,23,17,10]
Which of the following Python function can be used to add more than one element within an existing list?
append()
append_more()
extend()
more()
What will be the result of the following Python code? S=[x**2 for x in range(5)] print(S)
[0,1,2,4,5]
[0,1,4,9,16]
[0,1,4,9,16,25]
[1,4,9,16,25]
What is the use of type() function in python?
To create a Tuple
To know the type of an element in tuple.
To know the data type of python object.
To create a list.
Which of the following statement is not correct?
A list is mutable
A tuple is immutable.
The append() function is used to add an element.
The extend() function is used in tuple to add elements in a list.
Let setA={3,6,9}, setB={1,3,9}. What will be the result of the following snippet? print(setA|setB)
{3,6,9,1,3,9}
{3,9}
{1}
{1,3,6,9}
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?
Symmetric difference
Difference
Intersection
Union
The keys in Python, dictionary is specified by
=
;
+
:
Which of the following are the key features of an Object Oriented Programming language?
Constructor and Classes
Constructor and Object
Classes and Objects
Constructor and Destructor
Functions defined inside a class:
Functions
Module
Methods
section
Class members are accessed through which operator?
&
.
#
%
Which of the following method is automatically executed when an object is created?
__object__( )
__del__( )
__func__( )
__init__( )
A private class variable is prefixed with
__
&&
##
**
Which of the following method is used as destructor?
__init__( )
__dest__( )
__rem__( )
__del__( )
Which of the following class declaration is correct?
class class_name
class class_name<>
class class_name:
class class_name[ ]
Which of the following is the output of the following program? class Student: def __init__(self, name): self.name=name print (self.name) S=Student(“Tamil”)
Error
Tamil
name
self
Which of the following is the private class variable?
__num
##num
$$num
&&num
The process of creating an object is called as:
Constructor
Destructor
Initialize
Instantiation
What is the acronym of DBMS?
DataBase Management Symbol
Database Managing System
DataBase Management System
DataBasic Management System
A table is known as
tuple
attribute
relation
entity
Which database model represents parent-child relationship?
Relational
Network
Hierarchical
Object
Relational database model was first proposed by
E F Codd
E E Codd
E F Cadd
E F Codder
What type of relationship does hierarchical model represents?
one-to-one
one-to-many
many-to-one
many-to-many
Who is called Father of Relational Database from the following?
Chris Date
Hugh Darween
Edgar Frank Codd
Edgar Frank Cadd
Which of the following is an RDBMS?
Dbase
Foxpro
Mongo DB
SQLite
What symbol is used for SELECT statement?
σ
Π
X
Ω
A tuple is also known as
table
row
attribute
field
Who developed ER model?
Chen
EF Codd
Chend
Chand
Which commands provide definitions for creating table structure, deleting relations, and modifying relation schemas.
DDL
DML
DCL
DQL
Which command lets to change the structure of the table?
SELECT
ORDER BY
MODIFY
ALTER
The command to delete a table including the structure is
DROP
DELETE
DELETE ALL
ALTER TABLE
Queries can be generated using
SELECT
ORDER BY
MODIFY
ALTER
The clause used to sort data in a database
SORT BY
ORDER BY
GROUP BY
SELECT
A CSV file is also known as a ....
Flat File
3D File
String File
Random File
The expansion of CRLF is
Control Return and Line Feed
Carriage Return and Form Feed
Control Router and Line Feed
Carriage Return and Line Feed
Which of the following module is provided by Python to do several operations on the CSV files?
py
xls
csv
os
Which of the following mode is used when dealing with non-text files like image or exe files?
Text mode
Binary mode
xls mode
csv mode
The command used to skip a row in a CSV file is
next()
skip()
omit()
bounce()
Which of the following is a string used to terminate lines produced by writer() method of csv module?
Line Terminator
Enter key
Form feed
Data Terminator
What is the output of the following program?
chennai,mylapore
mumbai,andheri
chennai
chennai,mylapore mumbai mumbai,andheri
Which of the following creates an object which maps data to a dictionary?
listreader()
reader()
tuplereader()
DictReader ()
Making some changes in the data of the existing file or adding more data is called
Editing
Appending
Modification
Alteration
What will be written inside the file test.csv using the following program
Exam Quarterly Halfyearly
Exam Quarterly Halfyearly
E
Q
H
Exam, Quarterly, Halfyearly
Which of the following is not a scripting language?
JavaScript
PHP
Perl
HTML
Importing C++ program in a Python program is called
wrapping
Downloading
Interconnecting
Parsing
The expansion of API is
Application Programming Interpreter
Application Programming Interface
Application Performing Interface
Application Programming Interlink
A framework for interfacing Python and C++ is
Ctypes
SWIG
Cython
Boost
Which of the following is a software design technique to split your code into separate parts?
Object oriented Programming
Modular programming
Low Level Programming
Procedure oriented Programming
The module which allows you to interface with the Windows operating system is
OS module
sys module
csv module
getopt module
getopt() will return an empty array if there is no error in splitting strings to
argv variable
opt variable
args variable
ifile variable
Identify the function call statement in the following snippet.
if __name__ =='__main__':
main(sys.argv[1:])
main(sys.argv[1:])
__name__
__main__
argv
Which of the following can be used for processing text, numbers, images, and scientific data?
HTML
C
C++
PYTHON
What does __name__ contains ?
c++ filename
main() name
python filename
os module name
Which of the following is an organized collection of data?
Database
DBMS
Information
Records
SQLite falls under which database system?
Flat file database system
Relational Database system
Hierarchical database system
Object oriented Database system
Which of the following is a control structure used to traverse and fetch the records of the database?
Pointer
Key
Cursor
Insertion point
Any changes made in the values of the record should be saved by the command
Save
Save As
Commit
Oblige
Which of the following executes the SQL command to perform some action?
execute()
key()
cursor()
run()
Which of the following function retrieves the average of a selected column of rows in a table?
Add()
SUM()
AVG()
AVERAGE()
The function that returns the largest value of the selected column is
MAX()
LARGE()
HIGH()
MAXIMUM()
Which of the following is called the master table?
sqlite_master
sql_master
main_master
master_main
The most commonly used statement in SQL is
cursor
select
execute
commit
Which of the following keyword avoid the duplicate?
Distinct
Remove
Where
GroupBy
Which is a python package used for 2D charts?
matplotlib.pyplot
matplotlib.pip
matplotlib.numpy
matplotlib.plt
Identify the package manager for installing Python packages, or modules.
Matplotlib
PIP
plt.show()
python package
Which of the following feature is used to represent data and information graphically?
Data List
Data Tuple
Classes and Objects
Data Visualization
.......... is a collection of resources assembled to create a single unified visual display.
Interface
Dashboard
Objects
Graphics
Which of the following module should be imported to visualize data and information in Python?
csv
getopt
mysql
matplotlib
............ is a type of chart which displays information as a series of data points connected by straight line segments.
csv
Pie chart
Bar chart
All the above
Choose Output
Identify the right type of chart using the following hints.
Hint 1: This chart is often used to visualize a trend in data over intervals of time.
Hint 2: The line in this type of chart is often drawn chronologically.
Line chart
Bar chart
Pie chart
Scatter plot
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.
Statement A is correct
Statement B is correct
Both the statements are correct
Both the statements are wrong
