SELECT *
FROM (`youtube_videos`)
WHERE `display_status` = 1
ORDER BY `video_id` desc
LIMIT 1SELECT *
FROM (`youtube_videos`)
WHERE `display_status` = 1
ORDER BY `video_id` desc
Choose the most appropriate
answer from the four given alternatives and write the option code with the
corresponding answer.
15 x 1 = 15
Which of the following is a unit of code that is often defined within a greater code structure?
(a)
Subroutines
(b)
Function
(c)
Files
(d)
Modules
CDT expansion is
(a)
Collective Data Type
(b)
Class Data Type
(c)
Concrete Data Type
(d)
Central Data Type
Which of the following variable can be accessed inside or outside of all the functions in a program?
(a)
Local
(b)
Global
(c)
Enclosed
(d)
Built-in
Time complexity of bubble sort in best case is
(a)
θ (n)
(b)
θ (nlogn)
(c)
θ (n2)
(d)
θ (n(logn) 2)
Find the odd man out
(a)
Statement
(b)
Operator
(c)
Identifier
(d)
Keyword
Which of the following keyword is used to exit a function block?
(a)
define
(b)
return
(c)
finally
(d)
def
What will be the output of the following code?
str1 = "Chennai Schools"
str1[7] = "-"
(a)
Chennai-Schools
(b)
Chenna-School
(c)
Type error
(d)
Chennai
Which of the following set operation includes all the elements that are in two sets but not the one that are common to two sets?
(a)
Symmetric difference
(b)
Difference
(c)
Intersection
(d)
Union
Which of the following class declaration is correct?
(a)
class class_name
(b)
class class_name<>
(c)
class class_name:
(d)
class class_name[ ]
In which of the following data organized in a way that, it can be easily accessed, managed and updated?
(a)
Database
(b)
DBMS
(c)
Structure
(d)
Object
The clause used to sort data in a database
(a)
SORT BY
(b)
ORDER BY
(c)
GROUP BY
(d)
SELECT
_______ file cannot store charts or graphs.
(a)
Excel
(b)
MsWord
(c)
CSV
(d)
Openoffiee calc
Which of the following clause is often used with aggregate functions to group the result?
(a)
ORDERBY
(b)
WHERE
(c)
GROUP BY
(d)
DISTINCT
Observe the output figure. Identify the coding for obtaining this output.
(a)
import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,5,1])
plt.show()
(b)
import matplotlib.pyplot as plt
plt.plot([1,2],[4,5])
plt.show()
(c)
import matplotlib.pyplot as plt
plt.plot([2,3],[5,1])
plt.show()
(d)
import matplotlib.pyplot as plt
plt.plot([1,3],[4,1])
plt.show()
The different kinds of plot created using
(a)
Matplotlib
(b)
Matplot
(c)
Plotlib
(d)
Matliplot
Part B
Answer any SIX questions. Question number 24 is
compulsory
6 x 2 = 12
Construct on algorithm that arranges meetings between these two types so that they change their color to the third type. In the end, all should display the same color.
What is Mapping?
Write short notes on Exponent data?
Write a python program to find the sum of odd numbers between. 10 and 20.
What is local variable?
What is set in Python?
Write the syntax for the following
(i) Creating objects
(ii) Accessing class members
Differentiate BETWEEN AND NOT BETWEEN keywords.
Write a note on main (sys.argv [1]).
Part C
Answer any SIX questions. Question number 33 is compulsory
6 x 3 = 18
Write a short note an syntax for function types.
Differentiate Concrete data type and abstract datatype.
Why access control is required?
Write a note on time/space trade off
Write a note on simple if statement with an example.
Differentiate ceil() and floor() function?
What will be the output of the following code?
list = [2**x for x in range(5)]
print (list)
What is the difference between Select and Project command?
Write the plot for the following pie chart output.
Part D
Answer All Questions
5 x 5 = 25
Write a program to read the CSV file through python using reader ( ) method.
Write the Python script to display all the records of the following table using fetchmany()
Icode
ItemName
Rate
1003
Scanner
10500
1004
Speaker
3000
1005
Printer
8000
1008
Monitor
15000
1010
Mouse
700
Consider the following employee table. Write SQL commands for the qtns.(i) to (v).
EMP CODE
NAME
DESIG
PAY
ALLOWANCE
S1001
Hariharan
Supervisor
29000
12000
P1002
Shaji
Operator
10000
5500
P1003
Prasad
Operator
12000
6500
C1004
Manjima
Clerk
8000
4500
M1005
Ratheesh
Mechanic
20000
7000
(i) To display the details of all employees in descending order of pay.
(ii) To display all employees whose allowance is between 5000 and 7000.
(iii) To remove the employees who are mechanic.
(iv) To add a new row.
(v) To display the details of all employees who are operators.
Write a python program to execute the following C++ program.
C++ program:
/*Write a C++ program using a user defined
function to function cube of a number. */
// Now select File⇾New in Notepad and type the C++ program
#include
using namespace std;
// Function declaration
int cube(int num),
int main( )
{
int num;
int c;
cout<< "Enter any number: "<<endl;
cin >>num;
c = cube(num);
cout<< "Cube of" << num<< " is "<< c;
return 0;
}
//Function to find cube of any number
int cube(int num)
{
return (num * num * num);
}
// Save this file as cube_file.cpp
Write a python program to check whether the given string is palindrome or not.
Explain the components of DBMS.
Explain Jump statement in python.
Explain the scope of variables with an example.
Explain the representation of Abstract datatype using rational numbers.
Reviews & Comments about 12th Computer Science - Half Yearly Model Question Paper - 2019
Write your Comment