The first 5 questions are solved below. Log in as a CLASS 12th student to reveal solutions for the rest of this paper.
Log In →
Q1
mcq
1 mark
The function which cause side effects to the arguments passed are called __________.
-
A.
Dynamic function
-
B.
Impure function
-
C.
Pure function
-
D.
Partial function
Correct Answer: B —
Solution
The correct answer is (b) Impure function. An impure function may produce side effects or depend on external state, so the result is not determined only by its input arguments. A pure function, on the other hand, does not cause side effects and always gives the same output for the same inputs.
Q2
mcq
1 mark
The datatype whose representation is known are called __________.
-
A.
Concrete datatype
-
B.
Built in datatype
-
C.
Abstract datatype
-
D.
Derived datatype
Correct Answer: A —
Solution
The correct answer is (a) Concrete datatype. Concrete datatypes are datatypes whose representation is known. In contrast, abstract datatypes hide their internal representation and expose only operations.
Q3
mcq
1 mark
Which members are accessible from outside the class ?
-
A.
Secured members
-
B.
Public members
-
C.
Private members
-
D.
Protected members
Correct Answer: B —
Solution
The correct answer is (b) Public members. Public members of a class are accessible from outside the class. Private members are accessible only within the class, and protected members are accessible only in the class and its derived classes.
Q4
mcq
1 mark
Two main measures for the efficiency of an algorithm are __________.
-
A.
Time and Space
-
B.
Processor and Memory
-
C.
Complexity and Time
-
D.
Data and Space
Correct Answer: A —
Solution
The correct answer is (a) Time and Space. The efficiency of an algorithm is mainly measured by its time complexity and space complexity. Time measures how long the algorithm takes, and space measures the memory used.
Q5
mcq
1 mark
Which key is used to execute Python Script ?
Correct Answer: A —
Solution
The correct answer is (a) F5. In Python IDEs such as IDLE, the F5 key is used to execute the Python script.
Q6
mcq
1 mark
Which of the following is the output of the given Python code if the value of $a$ is 52 ?
x='even' if $a\%2==0$ else 'odd'
print(x)
-
A.
error
-
B.
even
-
C.
no output
-
D.
odd
Q7
mcq
1 mark
A function which calls itself is called as :
-
A.
Lambda
-
B.
Built in
-
C.
Return
-
D.
Recursion
Q8
mcq
1 mark
Which of the following operator is used for concatenation ?
Q9
mcq
1 mark
If mylist=[10, 20, 30, 40] then mylist.append(35) will result :
-
A.
[10, 35, 20, 30, 40]
-
B.
[10, 20, 30, 40, 35]
-
C.
[35, 10, 20, 30, 40]
-
D.
[10, 20, 30, 35, 40]
Q10
mcq
1 mark
Which of the following is the private class variable ?
-
A.
$$num
-
B.
__num
-
C.
++num
-
D.
##num
Q11
mcq
1 mark
Who is called Father of Relational Database from the following ?
-
A.
Edgar Frank Codd
-
B.
Chris Date
-
C.
Chand
-
D.
Hugh Darween
Q12
mcq
1 mark
__________ command is used to change the structure of the table.
-
A.
MODIFY
-
B.
SELECT
-
C.
ALTER
-
D.
ORDER BY
Q13
mcq
1 mark
The expansion of CRLF is :
-
A.
Control Router and Line Feed
-
B.
Carriage Return and Line Feed
-
C.
Control Return and Line Feed
-
D.
Carriage Return and Form Feed
Q14
mcq
1 mark
A framework for interfacing Python and C++ is :
-
A.
Cython
-
B.
Ctypes
-
C.
Boost
-
D.
SWIG
Q15
mcq
1 mark
__________ function returns the largest value of the selected column.
-
A.
HIGH( )
-
B.
MAX( )
-
C.
MAXIMUM( )
-
D.
LARGE( )
Q16
short answer
What is subroutine ?
Q17
short answer
How Python represents the Private and Protected Access specifiers ?
Q18
short answer
What is the output of the following Python code ?
a=10
b=3
print(a/b)
print(a%b)
print(a**b)
print(a//b)
Q19
short answer
Evaluate the following function and write the output.
import math
x=26.72
y=64
print(math.floor(x))
print(math.ceil(x))
print(math.sqrt(y))
print(round(x,1))
Q21
short answer
What is data consistency ?
Q22
short answer
What is the use of next( ) function ?
Q23
short answer
Mention the users who uses the database.
Q24
short answer
What will be the output of following Python code ?
a=[x**2 for x in range(1, 5)]
print(s)
print(sum(s))
Q25
short answer
What are the different ways to access the elements of a list ? Give example.
Q26
short answer
What do you understand by Dynamic Programming ?
Q27
short answer
Write a program to display all 3 digit odd numbers.
Q28
short answer
Write a short note about the following with suitable example.
(a)capitalize( ) (b)swapcase( )
Q29
short answer
How to define constructor and destructor in Python ?
Q30
short answer
Differentiate PYTHON and C++.
Q31
short answer
Write a SQL statement to modify the student table structure by adding a new field.
Q32
short answer
Write any three key differences between Histogram and Bar Graph.
Q33
short answer
What will be the output of the given Python code ?
a=''Computer''
b=''Science''
x=a[:3]+b[len(b)-2:]
print(x.upper())
Q34
long answer
(A)Identify in the following program.
let rec gcd a b :=
if b < > 0 then gcd b (a mod b)
else
return a
(i)Name of the function.
(ii)Identify the statement which tells it is a recursive function.
(iii)Name of the argument variables.
(iv)Statement which invoke the function recursively.
(v)Statement which terminates the recursion.
OR
(b)Explain the different ways to delete elements from the list in Python with example.
Q35
long answer
(A)Explain Linear Search Algorithm.
OR
(b)Write a Python program to calculate factorial of the given number using for loop.
Q36
long answer
(A)Describe in detail the procedure of script mode programming in Python.
OR
(b)Explain the scope of variables in Python with example.
Q37
long answer
(A)Write the output of the following Python statements.
strl=''Welcome to Python Programming ''
print(strl[11:16])
print(strl[11:])
print(strl[:7])
print(strl[::3])
print(strl[::-5])
OR
(b)Explai
Q38
short answer
Consider the following student table. Write SQL commands for the questions (i) to (v).
Rollno Name Gender Average
101 ANU Female 98
102 BALAN Male 95
103 RAVI Male 82
104 DEVI Female 89
105 MANI Male 75
(i)To display all details of all students in descending order of name.
(ii)To add details of a new student.
(iii)To display all student details whose Average is between 70 and 90.
(iv)To remove the student detail whose Rollno=103.
(v)To display the details of female students.
OR
Write the Matplotlib functions for the following statements.
(i)To label the x axis.
(ii)To label the y axis.
(iii)To assign the plot’s title.
(iv)To display the plot.
(v)To invoke the default legend.