IP-QP-2
IP-QP-2
IP-QP-2
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 21 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 04 Short Answer type questions carrying 03 marks each.
6. Section D has 02 Case study type questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
Q SECTION-A Marks
1. Which device is used to regenerate the signals over long distance data transmission: 1
i. Switch ii. Modem iii. Repeater iv. None of the above
2. Whenever we surf the Internet using smartphones we leave a trail of data reflecting 1
the activities performed by us online, which is our ?
i. Data print ii. Digital activity iii. Digital footprint iv.Digital print
7. Which keyword is used to arrange the result of order by clause in descending order? 1
i. DSEC
ii. ASCE
iii. DESC
iv. ASC
8. Raj, a Database Administrator, needs to display the average pay of workers from those 1
departments which have more than five employees. He is experiencing a problem while running
the following query:
SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5
GROUP BY DEPT;
Which of the following is a correct query to perform the given task?
i. SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT(*) > 5GROUP BY DEPT;
ii. SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT(*) >
5 GROUP BY DEPT;
iii. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT(*) > 5;
iv. SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT
HAVING COUNT(*) > 5;
9. Which one of the following functions is used to count the no of rows from the given table 1
inMySQL?
i. COUNT(* )
ii. CARDINALITY( )
iii. COUNT(Column name )
iv. All the above
10. To display First 10 rows of a series object ‘Ser1’, you may write: 1
i. Ser1.tail(10)
ii. Ser1.head()
iii. Ser1.head(10)
iv. Ser1.tail()
14 Which one of the following is an output for SQL statement given below: 1
SELECT MONTH('2022-12-07');
i. 7
ii. 12
iii. 2022
iv. 188
15 The act of fraudulently acquiring someone’s personal and private information, such 1
as online account names, login information and passwordsis called as .
i. Phishing
ii. Identity Theft
iii. Plagiarism
iv. all the above
16 The method used for X axis label a line graph is 1
i. plt.title()
ii. plt.ylabel()
iii. plt.xlabel()
iv. plt.line()
17 How do you retrieve a column named "Age" from a DataFrame df? 1
a) df['Age']
b) df.Age()
c) df.Age[]
d) df.get(Age)
18 Which of the following is not a valid attribute of a DataFrame? 1
a) df.columns
b) df.shape
c) df.size
d) df.values()
19 Which of the following is a correct way to create a Pandas Series? 1
a) pd.Series([1, 2, 3, 4])
b) pd.Series(1, 2, 3, 4)
c) pd.Series{'a': 1, 'b': 2, 'c': 3}
d) pd.Series(1, 2, 3)
Q20 and 21 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
20 Assertion (A):- MODEM stands for modulator-demodulator. 1
Reasoning (R): - It is a computer hardware device that converts data from a
digital format to analog and vice versa.
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
21 Assertion (A):- To use the Pandas library in a Python program, one must 1
import it.
Reasoning (R): - The only alias name that can be used with the Pandas library is pd.
SECTION-B
22 Briefly explain the basic concepts of a web server and web hosting. 2
OR
Rati is doing a course in networking. She is unable to understand the concept ofURL. Help her by
explaining it with the help of suitable example.
23 Anjali writes the following commands with respect to a table employee having fields, 2
empno,name, department, commission.
Command1 : Select count(*) from employee;
Command2: Select count(commission) from employee;
She gets the output as 4 for the first command but gets an output 3 for the second command.
Explain the output with justification.
24 What is the difference between the order by and group by clause when used along with the 2
Select statement. Explain with an example.
25 The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
Import pandas as pd
df ={"Technology":["Programming","Robotics","3DPrinting"],"Time(in months)":[4,4,3]}
df= Pd.dataframe(df)
Print(df)
26 Differentiate between the active digital footprint and passive digital footprints. 2
Write commands to :
i. Add a new column ‘Stream’ to the Dataframe with values (Science, Commerce, Arts,
Science.)
ii. Add a new row with values ( 5 , Mridula ,X, F , 9.8, Science)
SECTION -C
29 Based on the SQL table CAR_SALES, write suitable queries for the following: 3
+ + + + + +
| NUMBER | SEGMENT | FUEL | QT1 | QT2 |
+ + + + + +
| 1 | Compact HatchBack | Petrol | 56000 | 70000 |
| 2 | Compact HatchBack | Diesel | 34000 | 40000 |
| 3 | MUV | Petrol | 33000 | 35000 |
| 4 | MUV | Diesel | 14000 | 15000 |
| 5 | SUV | Petrol | 27000 | 54000 |
| 6 | SUV | Diesel | 18000 | 30000 |
| 7 | Sedan | Petrol | 8000 | 10000 |
| 8 | Sedan | Diesel | 1000 | 5000 |
+ + + + + +
i. Display fuel wise average sales in the first quarter.
ii. Display segment wise highest sales in the second quarter.
iii. Display the records in the descending order of sales in the second quarter.
30 Consider the following Data Frame “HOSPITAL” 3
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 data frame HOSPITAL
31 3
Identify the type of cybercrime for the following situations:
i. A person complains that Rs. 4.25 lacs have been fraudulently stolen from
his/her account online via some online transactions in two days using NET
BANKING.
ii. A person complains that his/her debit/credit card is safe with him still
somebody has done shopping /ATM transaction on this card.
iii. A person complains that somebody has created a fake profile of Facebook and
defaminghis/her character with abusive comments and pictures
OR
As a citizen of India, what advice you should give to others for e-waste disposal ? Define
them in details.
32 3
Consider the following sql table ‘automobile’
wheel- num-of- Dateofmanufacture
index company body-style base cylinders price
0 bmw sedan 101.234 four 16925 1998-03-27
1 bmw sedan 101.261 six 20970 1999-05-23
2 honda sedan 96.538 four 12945 2000-03-02
3 honda sedan 96.519 four 10345 2001-02-01
4 toyota hatchback 95.727 four 5348 1999-03-01
5 toyota hatchback 95.173 four 6338 2000-05-11
Write SQL queries using SQL functions to perform the following operations:
i. Display company name and wheel-base after rounding off to nearest ten’s decimal
places.
ii. Display the position of occurrence of the string “dan” in body style.
iii. Display the year of manufacturing for sedan;
OR
Helps Abhay to Compare Having clause and Order by clause with the help of example?
SECTION -D
33 Preeti manages database in a blockchain start-up. For business purposes, she created a table 4
named BLOCKCHAIN. Assist her by writing the following queries:
TABLE: BLOCKCHAIN
As a network expert, provide the best possible answer for the following queries:
i. Suggest a cable layout of connections between the buildings.
ii. Suggest the most suitable place (i.e. buildings) to house the server of this organization.
iii. Suggest the placement of the following device with justification:
a) Repeater b) Hub/Switch
iv. Suggest a system (hardware/software) to prevent unauthorized access to or from the
network.
v. The company is planning to link its head office situated in Delhi with the offices in hilly
areas. Suggest a way to connect it economically.
37 Observe the following figure. Identify the coding for obtaining this as output. 5