10
10
SECTION –A
Q1) The attack that focuses on capturing small packets from the network transmitted by other computers and reading the
data content in search of any type of information is ______________.
a) Phishing b) Eavesdropping c) Scams d) PC intrusion
Q2) Predict the output of the following query:
SELECT MOD (9,0);
Q3) Raj, a Database Administrator, needs to display the average pay of workers from those 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?
a) SELECT DEPT, AVG(SAL) FROM EMP WHERE COUNT (*) > 5 GROUP BY DEPT;
b) SELECT DEPT, AVG(SAL) FROM EMP HAVING COUNT (*) > 5 GROUP BY DEPT;
c) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT WHERE COUNT (*) > 5;
d) SELECT DEPT, AVG(SAL) FROM EMP GROUP BY DEPT HAVING COUNT (*) > 5;
Q4) In SQL, the equivalent of UCASE () is:
a) UPPERCASE () b) CAPITALCASE() c) UPPER() d) TITLE()
Q5) The generally recognized term for the government protection afforded to intellectual property (written and electronic)
is called __________.
a) Computer Security Law b) aggregate functions
c) Copyright law d) data security standards
Q6) Predict the output of the following query:
SELECT LCASE (MONTHNAME ('2023-03-05'));
Q7) What will be the output of the given code?
import pandas as pd
s = pd.Series([1,2,3,4,5],
index=['akram','brijesh','charu','deepika','era'])
print(s['charu'])
Q8) Every activity you perform on the internet is saved for how long?
a) one month b) one year c) forever d) as per my setting
Q9) Which of the following SQL functions does not belong to the Math functions category?
a) POWER() b) ROUND() c) LENGTH() d) MOD()
Q10) In URL, http://www.somestore.com/firstfloor/shoes.htm, which component identifies the protocol or type of the
server?
Q11) A male or message sent to a large number of people indiscriminately without their consent is called _________.
Q12) With reference to SQL, identify the invalid data type.
a) date b) integer c) year d) month
Q13) Ritika is a new learner for the python pandas, and she is aware of some concepts of python. She has created some
lists, but is unable to create the data frame from the same. Help her by identifying the statement which will create the data
frame.
import pandas as pd
Name=['Manpreet','Kavil','Manu','Ria']
Phy=[70,60,76,89]
Chem=[30,70,50,65]
a) df=pd.DataFrame({"Name":Name,"Phy":Phy,"Chem":Chem})
b) d=("Name":Name,"Phy":Phy,"Chem":Chem)
df=pd.DataFrame(d)
c) df=pd.DataFrame([Name,Phy,Chem],columns=['Name',"Phy","Chem","Total"])
d) df=pd.DataFrame({Name:"Name", Phy :"Phy",Chem: "Chem"})
Q14) Which topology contains a backbone cable running through the whole length of the network?
Q15) Which of the following is not a part of URL?
a) IP address b) Port Number c) Domain Name d) None of these
Q16) FLOSS stand for ______________.
Q17 and 18 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 is false but R is True
Q17) Assertion (A): -: pandas is an open-source Python library which offers high performance, easy-to-use data structures
and data analysis tools.
Reasoning (R): - Professionals and developers are using the pandas library in data science and machine learning.
Q18) Assertion (A): - Data visualization refers to the graphical representation of information and data using visual elements
like charts, graphs, and maps etc.
Reasoning (R): - To install matplotlib library we can use the command
pip install matplotlib.
SECTION-B
Q19) For web pages where the information is changed frequently, for example, stock prices, weather information which
out of the following options would you advice?
a) Static Webpage b) Dynamic Webpage
Justify your answer.
Q20) The python code written below has syntactical errors. Rewrite the correct code 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)
Q21) Aryan, a database administrator, has grouped records of a table with the help of group by clause. He needs to further
filter groups of records generated through group by clause. Suggest suitable clause for it and properly explain its usage
withthe help of an example.
Q22) Create a DataFrame in Python from the given list:
[[‘Divya’,’HR’,95000],[‘Mamta’,’Marketing’,97000],[‘Payal’,’IT’,980000], [‘Deepak’,’Sales’,79000]]
Also give appropriate column headings.
Q23) Nivedita has recently shifted to a new city and new school. She doesn’t know many people in her new city and school.
But all of a sudden someone is posting negative, demeaning comments on her social networking profile, school site’s forum
etc. She is also getting repeated mails from unknown people. Every time she goes online, she finds someone chasing her
online.
a) What is happening with Nivedtia?
b) What action should she take to stop them?
OR
Mention any two health hazards associated with inappropriate and excessive use of gadgets.
Q24) Find the output of the following code: -
Stationery = ['pencils', 'notebooks', 'scales', 'erasers']
S = pd. Series ([20, 33, 52, 10], index = Stationery)
S2 = pd. Series ([17, 13, 31, 32], index = Stationery)
print (S + S2)
S = S + S2
print (S + S2)
S[0:2] = 12
print(S)
Q25) Write a code to plot a bar chart to depict the pass percentage of students in CBSE exams for the years 2015 to 2018
as shown below-
SECTION-C
Q26) Predict the output of the following queries:
a) select instr('[email protected]','.');
b) select substr('[email protected]',7,4);
c) select left('[email protected]',5);
Q27) The heights of 10 students of eighth grade are given below:
Height_cms=[145,141,142,142,143,144,141,140,143,144]
Write suitable Python code to generate a histogram based on the given data, along with an appropriate chart title and both
axis labels. Also give suitable python statement to save this chart.
Q28) Based on the SQL table CAR_SALES, write suitable queries for the following:
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
a) Display fuel wise average sales in the first quarter.
b) Display segment wise highest sales in the second quarter.
c) Display the records in the descending order of sales in the second quarter.
OR
Predict the output of the following queries based on the table CAR_SALES
given above:
a) SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL="PETROL";
b) SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE SEGMENT= "SUV";
c) SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL= "DIESEL";
Q29) Internet security is a major issue for many people. The following is a list of four typical security issues:
• Pharming
• Phishing
• Spyware
• Virus
For any three, describe the security issue and suggest a way of protecting against it.
Q30) Write MySQL statements for the following:
a) To create a database named FOOD.
Media Business
Target Sales
Zone B 70000 68000