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
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
Q3
mcq
1 mark
Which members are accessible from outside the class ?
- A. Secured members
- B. Public members
- C. Private members
- D. Protected members
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
Q5
mcq
1 mark
Which key is used to execute Python Script ?
- A. F5
- B. F1
- C. F10
- D. F2
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
Q7
mcq
1 mark
A function which calls itself is called as :
- A. Lambda
- B. Built in
- C. Return
- D. Recursion
Solution hidden
Log in to view solution →
Q8
mcq
1 mark
Which of the following operator is used for concatenation ?
- A. *
- B. 1
- C. =
- D. &
Solution hidden
Log in to view solution →
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]
Solution hidden
Log in to view solution →
Q10
mcq
1 mark
Which of the following is the private class variable ?
- A. $$num
- B. __num
- C. ++num
- D. ##num
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
Q12
mcq
1 mark
__________ command is used to change the structure of the table.
- A. MODIFY
- B. SELECT
- C. ALTER
- D. ORDER BY
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
Q14
mcq
1 mark
A framework for interfacing Python and C++ is :
- A. Cython
- B. Ctypes
- C. Boost
- D. SWIG
Solution hidden
Log in to view solution →
Q15
mcq
1 mark
__________ function returns the largest value of the selected column.
- A. HIGH( )
- B. MAX( )
- C. MAXIMUM( )
- D. LARGE( )
Solution hidden
Log in to view solution →
Q17
short answer
How Python represents the Private and Protected Access specifiers ?
Solution hidden
Log in to view solution →
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)
Solution hidden
Log in to view solution →
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))
Solution hidden
Log in to view solution →
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))
Solution hidden
Log in to view solution →
Q25
short answer
What are the different ways to access the elements of a list ? Give example.
Solution hidden
Log in to view solution →
Q26
short answer
What do you understand by Dynamic Programming ?
Solution hidden
Log in to view solution →
Q27
short answer
Write a program to display all 3 digit odd numbers.
Solution hidden
Log in to view solution →
Q28
short answer
Write a short note about the following with suitable example.
(a)capitalize( ) (b)swapcase( )
Solution hidden
Log in to view solution →
Q29
short answer
How to define constructor and destructor in Python ?
Solution hidden
Log in to view solution →
Q31
short answer
Write a SQL statement to modify the student table structure by adding a new field.
Solution hidden
Log in to view solution →
Q32
short answer
Write any three key differences between Histogram and Bar Graph.
Solution hidden
Log in to view solution →
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())
Solution hidden
Log in to view solution →
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.
Solution hidden
Log in to view solution →
Q35
long answer
(A)Explain Linear Search Algorithm.
OR
(b)Write a Python program to calculate factorial of the given number using for loop.
Solution hidden
Log in to view solution →
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.
Solution hidden
Log in to view solution →
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
Solution hidden
Log in to view solution →
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.
Solution hidden
Log in to view solution →