0% found this document useful (0 votes)
38 views8 pages

12th Computer Science Public Exam March 2024 Answer Key PDF Download

This document provides the answer key for the Higher Secondary Second Year Computer Science public examination scheduled for March 2024. It includes answers for multiple-choice questions, short answer questions, and detailed explanations for various programming concepts and functions. Additionally, it outlines the structure of the exam and encourages students to send their answers to a specified email address.
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)
38 views8 pages

12th Computer Science Public Exam March 2024 Answer Key PDF Download

This document provides the answer key for the Higher Secondary Second Year Computer Science public examination scheduled for March 2024. It includes answers for multiple-choice questions, short answer questions, and detailed explanations for various programming concepts and functions. Additionally, it outlines the structure of the exam and encourages students to send their answers to a specified email address.
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/ 8

www.Padasalai.Net www.Trb Tnpsc.

com

HIGHER SECONDARY SECOND YEAR

PUBLIC EXAMINATION – MARCH 2024

COMPUTER SCIENCE ANSWERS KEY

PART-I

Answer All the Questions 15 x 1=15

Q. NO OPTION ANSWER Mark

1 c Big O 1

et
2 c Abstract datatype 1

i.N
3 b F5 1

4 a Interface 1

5 a Access control 1

la
6 d [] 1
sa
7 c Instantiation 1

8 d x%4==0 1
da

9 b σ 1

10 a [10,20,35,40,50] 1
Pa

11 b Flat file 1

12 d select 1
w.

13 a 0134 1
ww

14 d Dashboard 1

15 d ORDER BY 1

PART-II

Answer any six questions. Question no 24 is compulsory 6x2=12

Q. NO ANSWER MARKS
16. Abstract Data type (ADT) is a type for objects whose behavior is defined by a set 2
of values and operations.
17.  Arithmetic operators 2
 Relational operators (OR) Comparative operators
 Logical operators

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

 Assignment operators
 Conditional operator
18. To search an item in data structure is called as searching 1
(or)
Searching is used to locate specific data in a list
Types 1.Linear Search (or)Sequential Search 1
2.Binary Search (or) half-interval Search
19. 1.User-defined Functions 2
2. Built-in Functions
3.Lambda Functions
4.Recursion Functions

et
20. 2
 Line plot
 Scatter plot

i.N
 Histogram
 Box plot
 Bar chart
 Pie chart [Any four]

21.
la
sa
da

2
Pa

.
w.

22. A CSV file is a human readable text file where each line has a number of fields, 2
separated by commas or some other delimiter.
23. The fetch all() method is used to fetch all rows from the database table 2
ww

24. pop () function can also be used to delete an element using the given index value. 2
(OR)
pop() function deletes and returns the last element of a list if the index is not
given.

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

PART-III

Answer any six questions. Question no 33 is compulsory 6x3=18

ANSWER
Q. NO MARKS
25.
Pure function Impure function
The return value of the pure The return value of the impure functions
functions not solely depends does not solely depends on its arguments 1
on its arguments passed passed
They do not have any side They have any side effects
1
effects

et
They do not modify the They may modify the arguments which are
arguments which are passed passed to them 1
to them

i.N
26. The elements of a list can be accessed in two ways
(i) multiple assignment, which unpacks a list into its elements and binds each
element to a different name
lst := [10, 20] 1½
x, y := lst
la
will become10 and y will become 20.
sa
(ii) element selection operator.a square-brackets expression directly following
another expression does not evaluate to a list value, but instead selects an element
from the value of the preceding expression. 1½
da

lst[0]
10
lst[1]
Pa

20
27. Asymptotic Notations are languages that uses meaningful statements about time 2
and space complexity
(i) Big O
w.

(ii) Big Ω

(iii) Big Θ 1
ww

28. a=int(input(“Enter the number1:”)) 3


b=int(input(“Enter the number2:”))
c=int(input(“Enter the number3:”))
if a>b and a>c:
print(“a is greater”)
elif b>a and b>c:
print(“b is greater”)
else:
print(“c is greater”)

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

29. (a) capitalize( ) - Used to capitalize the first character of the string 2
(b)swapcase( )- It will change case of every character to its opposite case
vice-versa
Any Suitable Example….. 1

30. Constructor
Constructor is the special function that is automatically executed when an
object of a class is created. 1½
In Python, there is a special function called “init” which act as a Constructor.
It must begin and end with double underscore.
Destructor
Destructor is also a special method to destroy the objects.

et
In Python, _ _del_ _( ) method is used as destructor. 1½
It is just opposite to constructor
31 1. To automate certain tasks in a program 3

i.N
2. Extracting information from a data set
3. Less code intensive as compared to traditional programming language
4. can bring new functions to applications and glue complex systems

la
together
sa [Any Three]

WHERE clause is used to extract only those records that fulfill a specified 1
32. condition.
da

Any Suitable Example….. 2

33. Commit: Saves any transaction into the database permanently 1


Pa

Roll back: Restores the database to last commit state. 1

Save point: Temporarily save a transaction so that you can rollback 1


w.

PART-IV

Answer all questions. 5x5=25


ww

34. a) To facilitate data abstraction, you will need to create two types 2
of functions: constructors and selectors.
Constructors are functions that build the abstract data type.
Selectors are functions that retrieve information from the data
type.
Ex: This city object will hold the city‟s name, and its latitude
and longitude. To create a city object, you‟d use a function like 3
city:= makecity (name, lat, lon)
To extract the information of a city object, you would use
functions like

getname(city)

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

getlat(city)
getlon(city)

b) Binary search also called half-interval search algorithm. It 1


finds the position of a search element within a sorted array.
Pseudo Code
 Start with the middle element
 If the search element is equal to the middle element of
the array, then return the index of the middle element.
 If not, then compare the middle element with the search
key 2
 If the search element is greater than the number in the

et
middle index, then select the elements to the right side
of the middle index, and go to Step-1.
 If the search element is less than the number in the

i.N
middle index, then select the elements to the left side of
the middle index, and start with Step-1.
 When a match is found, display success message with
the index of the element matched

la
 If no match is found for all comparisons, then display
unsuccessful message
2
sa
A Suitable Example

35.a) Print( ) function


da

In Python, the print() function is used to display result on the 2½


screen
Syntax:
print (“string to be displayed as output ” )
Pa

print (variable )
print (“String to be displayed as output ”, variable)
print (“String1 ”, variable, “String 2”, variable, “String 3”
……)
w.

(Any one of syntax)


Any Suitable Example
ww

input( ) function
In Python, input( ) function is used to accept data as input at run 2½
time. The syntax for input() function is,
Syntax:
Variable = input (“prompt string”)
Any Suitable Example
b) Scope of variable refers to the part of the program, where it is 1
accessible.There are two types of scopes:Local Scope and
Global Scope
Local Scope- A variable declared inside the function's body is 1
known as local variable. It can be accessed only within the
function that it is created in
1

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

Any Suitable Example


Global Scope -A variable, with global scope can be used
anywhere in the program. It can be created by defining a 1
variable outside the scope of any function/block.The „global‟
keyword is used to access a variable inside a function
1
Any Suitable Example
36.a) (3 marks can be allotted if anyone of the method is written)

The range() is a function used to generate a series of values in


Python. 3

Using range() function, you can create list with series of values.

et
The range() function has three arguments.

i.N
Syntax of range ( ) function:

range (start value, end value, step value)

la
start value – beginning value of series. Zero is the default
beginning value.
sa
end value – upper limit of series. Python takes the ending value
as upper limit – 1.
step value – It is an optional argument, which is used to
da

generate different interval of values.


(OR)
The range() is a built-in function, to generate series of values
Pa

between two numeric intervals.


The syntax of range() is as follows:
w.

range (start,stop,[step])

Where,
ww

start – refers to the initial value


stop – refers to the final value
step – refers to increment value, this is optional part.
Any valid example
2

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

b) (i) UNION (Symbol :∪) 1


It includes all tuples that are in tables A or in B. It also
eliminates duplicates. Set A Union Set B would be expressed as
A∪B
Suitable examples
1
(ii) INTERSECTION (symbol : ∩) A ∩ B
Defines a relation consisting of a set of all tuple that are in both
in A and B. However, A and B must be union-compatible. 1
Suitable examples

(iii)SET DIFFERENCE ( Symbol : - )

et
The result of A – B, is a relation which includes all tuples that
are in A but not in B.

i.N
The attribute name of A has to match with the attribute name in 1
B.
Suitable examples

la
(iv)CARTESIAN PRODUCT (Symbol : X )
Cross product is a way of combining two relations. The 1
sa
resulting relation contains, both relations being combined.
Suitable examples
da

37.a) SQL commands are divided into five categories:


1
DML - Data Manipulation Language
Pa

DDL - Data Definition Language

DCL - Data Control Language


w.

TCL - Transaction Control Language

DQL - Data Query Language


ww

Explanation 4

b.
 Python uses Automatic Garbage Collection whereas
C++ does not. 5
 C++ is a statically typed language, while Python is a
dynamically typed language.
 Python runs through an interpreter, while C++ is pre-
compiled.
 Python code tends to be 5 to 10 times shorter than that
written in C++.
 In Python, there is no need to declare types explicitly

kindly send me your key Answers to our email id - [email protected]


www.Padasalai.Net www.Trb Tnpsc.com

where as it should be done in C++


 In Python, a function may accept an argument of any
type, and return multiple values without any kind of
declaration beforehand. Whereas in C++ return
statement can return only one value.
(Any Five)
38.a) There are two ways to read a CSV file.
1. Use the csv module‟s reader function 1
2. Use the DictReader class
When you want to read from or write to a file,you need to open
it. Once the reading is over it needs to be closed.

et
csv.reader() function. 2
You can read the contents of CSV file with the help of
csv.reader() function. The reader function is designed to take

i.N
each line of the file and make a list of all columns
The syntax for csv.reader() is
csv.reader(fileobject,delimiter,fmtparams)

la
DictReader method
It creates an object which maps data to a dictionary. The keys
are given by the fieldnames as parameter. DictReader works by
sa
reading the first line of the CSV and using each comma 2
separated value in this line as a dictionary key. The columns in
each subsequent row then behave like dictionary values and can
da

be accessed with the appropriate key


b. Home Button → The Home Button will help once you have
begun navigating your chart. If you ever want to return back to
the original view, you can click on this.
Pa

5
Forward/Back buttons → These buttons can be used like the
Forward and Back buttons in your browser. You can click these Created by,
to move back to the previous point you were at, or forward
w.

again. E.RAJKUMAR M.C.A.,B.Ed,

Pan Axis → This cross-looking button allows you to click it, PG COMPUTER SCIENCE
and then click and drag your graph around.
ww

Tenkasi district
Zoom → The Zoom button lets you click on it, then click and
drag a square that you would like to zoom into specifically. Mobile No:8122402438
Zooming in will require a left click and drag. You can
alternatively zoom out with a right click and drag.
Configure Subplots → This button allows you to configure
various spacing options with your figure and plot.
Save Figure → This button will allow you to save your figure
in various forms
(Any Five)

kindly send me your key Answers to our email id - [email protected]

You might also like