0% found this document useful (0 votes)
3 views7 pages

Computer Science em

This document is the answer key for the HSE Second Year Examination in Computer Science for March 2025, detailing the maximum marks and instructions for evaluation. It includes answers for multiple-choice questions, short answer questions, and detailed explanations for various programming concepts. The document is structured into four parts, with varying marks allocated for each section.

Uploaded by

Jeena Jabez
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)
3 views7 pages

Computer Science em

This document is the answer key for the HSE Second Year Examination in Computer Science for March 2025, detailing the maximum marks and instructions for evaluation. It includes answers for multiple-choice questions, short answer questions, and detailed explanations for various programming concepts. The document is structured into four parts, with varying marks allocated for each section.

Uploaded by

Jeena Jabez
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/ 7

DIRECTORATE OF GOVERNMENT EXAMINATIONS, CHENNAI – 6

HSE SECOND YEAR EXAMINATION, MARCH-2025


COMPUTER SCIENCE ANSWER KEY - ENGLISH MEDIUM

Maximum Marks: 70
Note:
1. Only answers written in Blue Or Black ink should be evaluated
2. Choose the most appropriate answer the given four alternatives and
write the option code and the corresponding answer.

PART – I

Answer All the Questions 15×1=15

Option
Q.No. Answer Mark
Code
1 (c) Definition 1
2 (a) Constructor 1
3 (b) LEGB 1
4 (c) Half-interval search 1
5 (b) Ternary 1
6 (a) for 1
7 (d) return 1
8 (a) positive or negative numbers 1
9 (a) ecneicS retupmoC 1
10 (d) . 1
11 (b) Chen 1
12 (b) SELECT 1
13 (a) Modification 1
14 (b) OS module 1
15 (b) Distinct 1

Page | 1
Part – II
Answer Any Six questions Question No.24 is compulsory. 6×2=12
Q.No Answer Marks
16 Any way of bundling two values together into one can be 1
considered as a pair.
Eg : Lists (or ) Any Suitable Example. 1

17 To sort items in a certain order using the methods is called


Sorting
(or) 2
Sorting is a process of arranging group of items in an
ascending or descending order.

18 Output :
5 10 15 2

19  Slicing is a substring of a main string using by [ ] slicing 2


operator.

20  Destructor is a special method gets execution 2


automatically when an object exits from the scope.

21  Create a table – DDL - Data Definition Language 1


(CREATE)
 Values can be added to the table - DML Data 1
Manipulation Language (INSERT)

22  To change a directory 'cd' command is used. 2


Any Suitable Example

23  You can install matplotlib using pip. 2

24 OUTPUT
False 1
welcome 1

Page | 2
Part – III
Answer Any SIX questions Question No.33 is compulsory. 6×3=18
Q.No Answer Marks
25  The variables used inside the function may cause side
effects though the functions which are not passed with any
arguments. In such cases the function is called impure
function. When a function depends on variables or functions 3
outside of its definition block, you can never be sure that
the function will behave the same every time it’s called.
 Example: random( ) function.

26 Global Variable:
(i). A variable which is declared outside of all the
functions in a program.
(ii). Global Variable can be accessed inside or outside of 3
all the functions in a program.
(Give Suitable Example)

27 Assignment Operator
 =
 +=
 -=
 *= 3
 /=
 %=
 **=
 //=

28 Ceil ( ) Floor ( )

 Returns the smallest  Returns the largest 3


integer greater than or integer less than or
equal to x. equal to x.

29 (i). List.remove(element). 1
(ii). List.pop(index of an element) (or) List.pop() 1
(iii). List.clear(). 1

Page | 3
30  Cross product is a way of combining two relations. The
resulting relation contains, both relations being 3
combined.
(Any Suitable Example)
31  reader work with list/tuple.
 DictReader() work with dictionary 3

32 fetchone()
 The fetchone() method returns the next row of a query
result set
 None in case there is no row left.
fetchmany() 3
 Displaying specified number of records is done by using
fetchmany().
 This method returns the number of rows of the result
set.

33 OUTPUT :
[1,4,9,16,25] 3

Part – IV
Answer all of the following Questions 5×5=25

Q.
Answer Marks
No
34 Pure Function Impure Function
a)
 The return value of the  The return value of the
pure functions solely impure functions does not
depends on its arguments solely depend on its
passed. arguments passed.
 If you call the pure  If you call the impure
functions with the same functions with the same 5
set of arguments, you will set of arguments, you
always get the same might get the different
return values. return values
 They do not have any side  They do have any side
effects. effects
 This function do not  This function may modify
modify the arguments the arguments

(Any Suitable Example)


(OR)
Page | 4
(b) Types of a Data Model 2
1. Hierarchical Model
2. Relational Model
3. Network Database Model
4. Entity Relationship Model
5. Object Model
Explanation 3
35 Types of Operator 2
(a) 1. Arithmetic operators
2. Relational or Comparative operators
3. Logical operators
4. Assignment operators
5. Conditional operator
Explanation 3
(OR)
(b) UNIQUE Constraint - No two rows have the same value in the
specified columns.
PRIMARY KEY Constraint - Primary key which helps to uniquely
identify a record. 5
DEFAULT Constraint - To assign a default value for the field.
CHECK Constraint - To set a limit value placed for a field.
Explanation
36 while loop (Syntax) 2
(a) while <condition>:
statements block 1
[else:
statements block2]

2
Explanation
1
Any Suitable Example
(OR)
(b) Python File Modes
 ‘r’ - Open a file for reading. (default)
 ‘w’ - Open a file for writing. Creates a new file if it does not
exist or truncates the file if it exists.
 ‘x’ - Open a file for exclusive creation. If the file already
exists, the operation fails. 5
 ‘a’ - Open for appending at the end of the file without
truncating it. Creates a new file if it does not exist.
 ‘t’ - Open in text mode. (default)
 ‘b’ - Open in binary mode.
 ‘+’ - Open a file for updating
Page | 5
37 Functions that calls itself is known as recursive. Recursion works 2
(a) like loop but sometimes it makes more sense to use recursion than
loop.
Overview of how recursive function works:
 Recursive function is called by some external code.
 If the base condition is met then the program gives
2
meaningful output and exits.
 Otherwise, function does some required processing and then
calls itself to continue recursion.
Any Suitable Example
1
(OR)
(b) sys Module:
 This Module provides access to built-in varibales used by the
interpretor
 sys.argv is the list of command-line arguments passed to the
Python program.
 The first argument, sys.argv[0] contains the name of the
python
Program
 sys.argv [1]is the next argument passed to the program (here
it
is the C++ file), which will be the argument passed through
main ().

os Module :
 The os module in Python provides a way of using operating
system dependent functionality. 5
 The functions that the os module allows you to interface with
the Windows operating system.

os.system (‘g++ ’ + <variable_name1> +‘ -<mode> ’ +


<variable_name2>)

getopt module :
 The getopt module of Python helps you to parse (split)
command-line options and arguments.
 This module provides getopt() method to enable command-
line
argument parsing.
Syntax :
<opts>,<args>=getopt.getopt(argv, options, [long_options])

Page | 6
38 Output
(a) {1, 2, 3, 4, 5, 6, 7, 8} 1
{4, 5} 1
{1, 2, 3} 1
{6, 7, 8} 1
{1,2,3,6,7,8} 1
(OR)
(b) Aggregate Function :

I. AVG( ) - Finds the average 1


II. COUNT( ) - Function returns the number of rows in a table 1
III. SUM( )- Finds the sum 1
IV. MAX( ) - The largest value of the selected column. 1
V. MIN( ) - The smallest value of the selected column. 1

Page | 7

You might also like