SET-4_IP_QP_Practice
SET-4_IP_QP_Practice
2
14 Mr. Manoj who is a business man by profession was constantly receiving abusive 1
emails Identify the type of crime for the above situation/incident happened to him?
a) Hacking
b) Phishing
c) Cyber bullying
d) Cyber stalking
15 To extract the first three rows and three columns of a data frame named ‘df1’ 1
which of the following is True :
( a. ) df1 . iloc [ 0 : 2 , 0 : 2 ]
( b. ) df1 . iloc [ 0 : 3 , 0 : 3 ]
( c. ) df1 . iloc [ 1 : 3 , 1 : 3 ]
( d. ) df1 . iloc [ 1 : 4 , 1 : 4 ]
16 1
Match the following SQL functions/clauses with their descriptions:
3
Q-20 and Q-21 are Assertion ( A ) and Reason type questions. Choose the
correct options as :
a) Both Assertion ( A ) and Reason ( R ) are True, and Reason ( R ) is the
correct explanatiion of Assertion ( A ).
b) Both Assertion ( A ) and Reason ( R ) are True, but Reason ( R ) is not
the correct explanatiion of Assertion ( A ).
c) Assertion ( A ) is True, but Reason ( R ) is False.
d) Assertion ( A ) is False, but Reason ( R ) is True.
20 Assertion ( A ) : A Series object comprises a set of data and their indices in two 1
separate 1D Arrays.
Reason ( R ) : The indices are always implicit and cannot be repeated in the
same array.
21 Assertion ( A ) : Constraints are some restrictions enforced on the columns of a 1
relation.
Reason ( R ) : They ensure the accuracy and reliability of the data in a database.
It may be a Column Constraint or a Table Constraint.
Q. No. Section – B ( 7 x 2 = 14 Marks ) Marks
22 (A) What will be the output of the following code : 2
26 What do you mean by composite Primary Key ? Explain with suitable example. 2
27 Explain any two ways in which technology can help students with disabilities. 2
28 (A) Write a Python program to create a DataFrame from the given table : 2
4
SAJJAN 20 SALESMAN
SUNIL 37 MANAGER
KAPIL 28 CLERK
OR
(B) Complete the given Python code to get the required output as: Rajasthan
import _________ as pd
di = { 'Corbett' : 'Uttarakhand', 'Sariska' : 'Rajasthan', 'Kanha' : 'Madhya Pradesh’,
'Gir' : 'Gujarat' }
NP = ___________ . Series( _____ )
print ( NP [ ___________ ] )
Table : cricket
Column Name Data Type Key
Batsman_ID varchar( 5 ) Primary Key
Batsman_name varchar( 12 )
innings int ( 3 )
Runs_scored int ( 6 )
average float
(B) Write SQL statement to add a new record in the table ‘cricket’ with the
following data :
6
ii. Display the name of all the passengers who are travelling to MUM in
uppercase.
iii. Display the Passanger names, source, destination along with their
corresponding flight model.
Q. No. Section – D ( 2 x 4 = 8 Marks ) Marks
33 Shiwani is studying in Class – XII in a school and during the study of “Plotting with 4
Pyplot”, she develop a program to create a horizontal bar chart as per the data
given. Help her to complete the program by supplying the missing statements :
( I ) Write the suitable code for the import statement in the blank space in the line
marked as Statement – 1.
( II ) Write the Python statement in place of Statement – 2 to create the above
7
horizontal bar chart.
(III) Fill in the blanks in Statement – 3 with the name of the function to set the
label on y – axis.
( IV) Write the Python statement to set the title of the chart as per the given figure.
OR
(B) Consider the following tables ‘CABHUB’ and ‘CUSTOMER’ and write the
output of the following SQL queries :
Table : CABHUB
Vcode VehicleName Make Color Capacity Charges
100 Innova Toyota White 7 15
102 SX4 Suzuki Blue 4 14
104 C Class Mercedes Red 4 35
105 A-Star Suzuki White 3 14
108 Indigo Tata Silver 3 12
Table : CUSTOMER
CCode CName Vcode
1 Hemant Sahu 101
2 Raj Lal 108
3 Feroza Shah 105
4 Ketan Dhal 104
( a. ) SELECT VehicleName
FROM CABHUB
8
WHERE Color = ‘WHITE’ ;
A
(Admin
Block)
D (Design P (Productiion
Block) Block)
S (Supply
Block)
9
The number of computers in each block :
Block No. of Computers
Block A 20
Block D 80
Block P 15
Block S 8
Class Fees
0 X 2500
1 XI 3000
2 X 2500
3 XII 4000
I. Add a column named ‘Section’ with the data : [ ‘P’ , ‘Q’ , ‘R’ , ‘S’ ].
II. Add a new ‘Class’ named ‘VIII’ having fees 1800.
III. Remove the column ‘Section’.
IV. Display name of all classes.
V. Rename the column ‘Fees’ to ‘Registration Fee’.
37 (A) Write suitable query for the following : 5
( a. ) To display the ‘emp_name’ and ‘salary’ of all employees in descending
order of ‘salary’ column in the ‘employee’ table.
( b. ) Write a query to display name of the month for date 01 – 07 – 2024.
( c. ) Write a query to remove leading ‘@’ characters from the string
‘@@@Science@@@’.
10
( d. ) Write a query to concatenate ‘name’ and ‘class’ columns of the ‘student’
table having their ‘age’ (column name) as 20 or 22 ;
( e. ) Rohan’s Date of Admission in the School is ‘2020–04–12’. Write an SQL
Query to extract only year from his Date of Admission.
OR
(B) Write suitable SQL query for the following :
( a. ) Calculate the remainder when 232 is divided by 13.
( b. ) Display the number of characters in the word ‘Informatics Practices’.
( c. ) Round off value 105.243 to nearest ten’s.
( d. ) Display 7 characters extracted from 5th left character onwards from string
‘Informatics Practices’.
( e. ) Display the position of occurrence of string ‘for’ in string ‘Information
is for knowledge’.
11