Set-3 Ip QP Practice
Set-3 Ip QP Practice
Page 1 of 9
6. Given a Pandas series called HEAD, the command which will display the first 1
3 rows is ______
A. print(HEAD.head(3))
B. print(HEAD.Heads(3))
C. print(HEAD.heads(3))
D. print(head.HEAD(3))
7. In order to draw charts in Python, which of the following statement will be 1
used:
A. import pyplot.matplotlib as pl
B. import matplotlib.pyplot as plt
C. Import matplotlib.pyplot as plt
D. import pyplot from matplotlib as plt
8. State whether the following statement is True or False 1
The SQL WHERE clause is used to filter records based on specified
conditions.
9. In Pandas which of the following dataframe attribute can be used to know the 1
number of rows and columns in a dataframe
A. size
B. index
C. count
D. shape
10. Which of the following is Net Etiquette? 1
A. Be Ethical
B. Be Responsible
C. Be Respectful
D. All of the above
11. If column “per” contains the data set (97.5, 56.2, 75.6, 56.2, 75.6), what will 1
be the output after the execution of the given query?
SELECT AVG(DISTINCT Fees) FROM student;
A. 76.43
B. 76.34
C. 67.43
D. 67.34
12. With reference to SQL, identify the invalid data type for TEXT values. 1
A. CHAR
B. VARCHAR
C. FIXCHAR
D. None of the above
13. When a DataFrame is created from List of Dictionaries, then dictionary keys 1
will become ______
A. Column labels
B. Row labels
C. Both of the above
D. None of the above
14. Stealing someone else’s intellectual work and representing it as own is called 1
________
A. Intellectual steal
B. Phishing
C. Plagiarism
D. Pickism
Page 2 of 9
15. To create an empty Series object, you can use: 1
A. pd.Series(empty)
B. pd.Series( )
C. pd.Series(np.NaN)
D. all of these
16. Which one of the following functions is used to count the no. of rows from the 1
given table in MySQL?
A. COUNT(* )
B. CARDINALITY( )
C. COUNT(Column name )
D. All the above
17. Which of the following statement is wrong in context of DataFrame?
A. Two dimensional size is Mutable
B. Can perform Arithmetic operators on rows and columns.
C. Homogeneous tabular data structure
D. Create Dataframe from numpy ndarray
18. To compare data vales of commission earned by salesman over a year,
which of the following type of graph should preferably be used?
A. line
B. area
C. bar
D. scatter
19. _____________________ is a physical or virtual appliance that passes
information between two or more packet-switched computer network.
A. Router
B. Switch
C. Both (i) and (ii)
D. None of these.
Q20 and 21 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A and R both are False
20. Assertion (A):- DataFrame is a multidimensional data structure. 1
Reasoning (R):- To use DataFrame in a program we need not to import pandas
library.
21. Assertion (A): SUM() is an Aggregate function. 1
Reason (R) : Multiple row functions work upon group of rows and return one
result for the complete set of rows.
SECTION-B (7 x 2 = 14 Marks)
22. (A)Given two series S1 and S2 2
S1 S2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Page 3 of 9
Find the output for following python pandas statements?
a. S1[ : 2]*100
b. S1 * S2
OR
(B)Consider the following DataFrame “HOSPITAL”
City Hospitals schools
0 Delhi 189 7916
1 Mumbai 208 8508
2 Kolkata 149 7226
3 Chennai 157 7617
Write python pandas code to create the above DataFrame HOSPITAL.
23. What is a digital footprint and why is it important? 2
24. A relation ‘Vehicle’ is given below:
VNO TYPE COMAPNY YEAR PRICE QTY
2
V1 WAGONAR MARUTI 2009 325000 35
V2 JEEP MAHINDRA 2005 1600000 10
V3 MIRAGE MITSUBISHI 2009 500000 15
V4 RAV4 TOYOTA 2012 5500000 10
V5 ALTOLXI MARUTI 2012 310000 45
V6 FTO MITSUBISHI 2022 850000 8
V7 LANCER MITSUBISHI 2021 733000 9
V8 GLANZA TOYOTA 2022 659000 12
Write suitable SQL queries for the following:
i. Display year wise highest price
ii. Display company wise lowest price
25. (A)Explain the terms Static and dynamic Web pages. 2
OR
(B)Differentiate web browser and search engine?
26. Discuss the significance of EQUI-JOIN clause in detail with the help of suitable 2
example.
27. List any one advantage and disadvantage of using technology. 2
28. (A)Write a Python code to create a DataFrame with appropriate column headings 2
from the list given below:
[[1001,'IND-AUS',’2022-10-17’], [1002,'IND-PAK',’2022-10-23’],
[1003,'IND-SA' , ‘2022-10-30], [1004,'IND-NZ',’2022-11-18’]]
OR
(B)What will be the output of the following code:
>>> import pandas as pd
>>> mydata=pd.Series( [‘Keerty’, ‘N Rohit’, ‘Aadhya’, ‘Julie’] )
>>> print(mydata < ‘Keerty’ )
SECTION-C (4 x 3 = 12 Marks)
29. Anika a student of class 12 had opened a face book account newly. She 3
received friend request from a group of class 12 girls from another school. After
some time, she starts getting negative comments on her posts. She also finds
that her pictures are being shared online without her permission. Based on the
given information, answer the questions given below:
i. Identify the type of cybercrime she is a victim of.
ii. Under which act, she can lodge a complaint to the relevant authorities?
Page 4 of 9
iii. Suggest her any two precautionary measures which she should take in
future while being online to avoid any such situations.
(B)The python code written below has syntactical errors. Rewrite the corrected
code and underline the correction made:
import Pandas as pd
COMP={“slid”:[“AB102”,”AB103”,”AB104”], “DEPT”:[“CHEM”,”ACCT”,”MNGR”]}
df=Pd.dataframe(comp)
print(Df)
31. Consider the given table Faculty, write suitable SQL queries for the following: 3
32. Based on the table given below, write SQL queries for the 3
following :
Table Name: Gadget
I_ID ItemName Manufacturer Price
PC01 Personal Computer AB Corp 35000
LC05 Laptop AB Corp 55000
PC03 Personal Computer AZee 32000
PC06 Personal Computer COMPAQ 37000
LC03 Laptop Pacific 57000
PT04 Tablet AZee 28000
Table: STOCK
I_ID SHOP_NAME QTY
PC01 Akhil Enterprises 10
LC01 Nihal and Sons 5
PC03 Renuka Technologies 12
PC01 Tanvi Techno and E-Waste firm 5
LC03 Akhil Enterprises 7
Page 5 of 9
i. Display number of minimum and maximum price for each manufacturer.
ii. To show number of itemsname wise from Gadget table.
iii. Display Product name along their corresponding shop details and
quantity of that product .
OR
Consider the table PRODUCT and CLIENT given below:
TABLE:PRODUCT
PR_ID PR_NAME MANUFACTURER PRICE QTY
BS10 BATH SOAP PEARSE 45.00 25
1
SP20 SHAMPOO SUN SILK 320.00 10
1
SP23 SHAMPOO DOVE 455.00 15
5
BS12 BATH SOAP SANTOOR 36.00 10
0
TB310 TOOTH BRUSH COLGATE 48.00 15
FW42 FACE WASH DETOL 66.00 10
2
BS14 BATH SOAP DOVE 38.00 20
5
TABLE:CLIENT
C_ID C_NAME CITY PR_ID
01 DREAM MART COCHIN BS101
02 SHOPRIX DELHI TB310
03 BIG BAZAR DELHI SP235
04 LIVE LIFE CHENNAI FW422
Write appropriate SQL Queries for the following:
i) Display productwise average quantity required
ii) Display first five characters of Manufacturer name of all products.
iii) Display the product name, price, client name and city with their
corresponding matching product Id.
SECTION-D (2 x 4 = 8 Marks)
33. Write a Python program to display a bar chart of the popularity of programming 4
Languages Data:
Programming languages: Java, Python, PHP, JavaScript, C#, ++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Also give suitable python statement to save this chart
34. Deepak, a movie information collector has designed a database for Indian 4
movies. Help him by writing answers of the following questions based on the
given table MOVIE:
movieID Name Rating Production Collection DORelease
201 Nadiya ke Paar A+ Rajshree 400 15-Aug-1989
202 Hum Aapke Hai A+ Dharma 1500 04-May-1992
Kon
Page 6 of 9
203 Veer Zara A Yashraj 1100 25-Oct-2004
204 Chandni A+ Yashraj 2000 08-Nov-1989
205 Om Shanti Om A Red Chillies 2007 14-Nov-2007
SECTION-E (3 x 5 = 15 Marks)
35. “Peace” is an educational NGO. It is setting up its new campus at Mumbai 5
for its Web-Based activities. The campus has 4 compounds as shown in the
RESOURCE TRAINING
COMPOUND COMPOUND
FINANCE
MAIN COMPOUND COMPOUND
Page 7 of 9
diagram below :
36. Ekam, a data analyst with a multinational brand has designed the DataFrame df 5
that contains the four quarter’s sales data of different stores as shown below:
Page 8 of 9
iii.Write Python statement to add a new column Total_sales which is the
addition of all the 4 quarter sales.
iv. Write python statement to export the DataFrame to a csv file named
data.csv stored at D: drive.
OR
***************************************
Page 9 of 9