The 15 one-mark questions from the March 2020 12th Standard Computer Science public exam, in paper order, with the correct option marked and a short explanation.
Q1
The function which will give exact result when same arguments are passed are called :
- A. Pure functionsCorrect
- B. Impure functions
- C. Partial functions
- D. Dynamic functions
Explanation. A pure function always returns the same result for the same arguments and has no side effects.
Q2
A sequence of immutable objects is called :
- A. Derived data
- B. Built in
- C. List
- D. TupleCorrect
Explanation. A tuple is an ordered sequence whose elements cannot be changed after creation, so it is immutable; a list is mutable.
Q3
Which of the following members of a class can be handled only from within the class ?
- A. Public members
- B. Private membersCorrect
- C. Protected members
- D. Secured members
Explanation. Private members are accessible only from within the class; protected members are also available to derived classes and public members everywhere.
Q4
Two main measures for the efficiency of an algorithm are :
- A. Data and space
- B. Processor and memory
- C. Complexity and capacity
- D. Time and spaceCorrect
Explanation. The efficiency of an algorithm is measured by its time complexity (running time) and space complexity (memory needed).
Q5
Expand IDLE :
- A. Integrated Design Learning Environment
- B. Insert Development Learning Environment
- C. Integrated Develop Learning Environment
- D. Integrated Development Learning EnvironmentCorrect
Explanation. IDLE stands for Integrated Development Learning Environment, the editor and shell supplied with Python.
Q6
What is the output of the following snippet ?
for i in range(2,10,2):
print(i,end=' ')
- A. 8 6 4 2
- B. 2 4 6 8 10
- C. 2 4 6 8Correct
- D. 2 4 6
Explanation. range(2,10,2) starts at 2 and steps by 2 but stops before 10, giving 2, 4, 6, 8.
Q7
Evaluate the following function and write the output.
x=14.4
print(math.floor(x))
- A. 13
- B. 14Correct
- C. 15
- D. 14.3
Explanation. math.floor() returns the largest integer less than or equal to x, so floor(14.4) = 14.
Q8
What will be the output of the following code ?
str="NEW DELHI"
str[3]="-"
- A. NEW-DELHI
- B. NE-DELHI
- C. NEW DELHICorrect
- D. NEW-ELHI
Explanation. Python strings are immutable, so str[3]="-" raises a TypeError and the string stays "NEW DELHI". The question is flawed (the code prints nothing), so the intended answer is taken as the unchanged string.
Q9
The keys in Python dictionary is specified by :
- A. ;
- B. =
- C. :Correct
- D. +
Explanation. In a dictionary each key is separated from its value by a colon, e.g. {'a': 1}.
Q10
Class members are accessed through which operator ?
- A. .Correct
- B. &
- C. %
- D. #
Explanation. Class members are accessed with the dot operator, as in object.member.
Q11
What symbol is used for SELECT statement ?
- A. Ω
- B. σCorrect
- C. π
- D. ×
Explanation. In relational algebra, SELECT is denoted by sigma (σ); PROJECT uses π and Cartesian product uses ×.
Q12
The command to delete a table is :
- A. DROPCorrect
- B. ALTER TABLE
- C. DELETE
- D. DELETE ALL
Explanation. DROP TABLE removes the whole table with its structure; DELETE removes only rows.
Q13
A CSV file is also known as a :
- A. Random File
- B. String File
- C. 3D File
- D. Flat FileCorrect
Explanation. A CSV file stores tabular data as plain text records with comma-separated fields, so it is called a flat file.
Q14
A framework for interfacing Python and C++ is :
- A. Ctypes
- B. BoostCorrect
- C. SWIG
- D. Cython
Explanation. Boost (Boost.Python) is the C++ framework used for interfacing Python and C++; Ctypes is a Python foreign function library, SWIG a wrapper generator and Cython a compiler.
Q15
Which of the following is an organized collection of data ?
- A. Records
- B. Information
- C. DBMS
- D. DatabaseCorrect
Explanation. A database is an organized collection of related data; a DBMS is the software that manages it.
About this paper
These are the Part I one-mark multiple-choice questions from the March 2020 12th Standard Computer Science public examination conducted by the Tamil Nadu Directorate of Government Examinations. The answers and explanations are prepared by TN Online Test for revision. Each question links to the textbook chapter it comes from, so you can go back to that chapter's notes and MCQs.