0% found this document useful (0 votes)
65 views5 pages

10

The document contains questions for a half-yearly examination on Informatics Practices. It has 5 sections with a total of 30 questions covering different topics related to SQL, Python, data security, internet concepts. The questions test a variety of skills from choosing the correct option to writing code to solve problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views5 pages

10

The document contains questions for a half-yearly examination on Informatics Practices. It has 5 sections with a total of 30 questions covering different topics related to SQL, Python, data security, internet concepts. The questions test a variety of skills from choosing the correct option to writing code to solve problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CLASS XII

HALF YEARLY EXAMINATION (2023-2024)


Subject: Informatics Practices
Time: 3 Hours MM: 70
General Instructions:
• This question paper contains five sections, Section A to E.
• All questions are compulsory.
• Section A have 18 questions carrying 01 mark each.
• Section B has 07 Very Short Answer type questions carrying 02 marks each.
• Section C has 05 Short Answer type questions carrying 03 marks each.
• Section D has 02 questions carrying 04 marks each.
• Section E has 03 Long Answer type questions carrying 05 marks each.

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.

b) To create a table named Nutrients based on the following specification:


Column Name Data Type Constraints
Food_Item Varchar(20) Primary Key
Calorie Integer -
SECTION-D
Q31) Preeti manages database in a blockchain start-up. For business purposes, she created a table named BLOCKCHAIN.
Assist her by writing the following queries:
TABLE: BLOCKCHAIN
id user Value hash Transaction_date
1 Steva 900 ERTY 2020-09-23
2 Meesha 145 @3456 2021-03-12
3 Nimisha 657 #fbvfkdj 2020-05-06
4 Pihu 798 Rrfdv* 2022-05-15
5 Kopal 567 wer@4 2021-03-29
6 Palak 356 %vshlj 2022-11-02
a) Write a query to display the year of oldest transaction.
b) Write a query to display the month of most recent transaction.
c) Write a query to display all the transactions done in the month of May.
d) Write a query to count total number of transactions in the year 2022.
Q32) Ekam, a Data Analyst with a multinational brand has designed the DataFrame df that contains the four quarter’s sales
data of different stores as shown below:
STORE Qtr1 Qtr2 Qtr3 Qtr4
STORE1 300 240 450 230
STORE2 350 340 403 210
STORE3 250 180 145 160
Answer the following questions:
a) Predict the output of the following python statement:
i. print(df.size)
ii. print(df[1:3])
b) Delete the last row from the DataFrame.
c) Write Python statement to add a new column Total_Sales which is the addition of all the 4 quarter sales.
OR
(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named data.csv stored at D: drive.
SECTION-E
Q33) Gargi Education Services Ltd. Is an educational organisation. It is planning to set up its in India campus at Nepal
with its head office at Mumbai. The Nepal campus has 4 main buildings – Admin, Engineering, Business, and Media.
You as an Network expert have to suggest the best network related solutions for their problems raised in (a) to (e), keeping
in mind the distance between the buildings and the other given parameters.
Mumbai Nepal

Head Office Campus


Engineering
Admin

Media Business

Shortest distance between various buildings:-


Admin to Engineering – 50m
Admin to Business – 80m
Engineering to Business – 60m
Admin to Media – 45m
Engineering to media – 50m
Business to Media – 45m
Mumbai Head office to Nepal Campus – 2175m
Number of computers installed at various buildings are as follows: -
Admin – 110
Engineering – 75
Business – 40
Media – 10
Mumbai head office – 20
a) Suggest the most appropriate location of the server inside the Nepal Campus (out of 4 buildings), to get best
connectivity for maximum number of computers. Justify your answer.
b) Suggest and draw the cable layout to efficiently connect various buildings within the Nepal campus for connecting the
computers.
c) Which hardware device will you suggest to be procured by the company to be installed to protect and control the
internet uses within the campus.
d) Which of the following will you suggest establish face to face communication between the people in the Admin office
of Nepal campus and Mumbai head office?
a) Cable TV b) E-mail c) Video Conferencing d) Text chat
e) Expand the following
a) MAN b) PAN
Q34) Why is the following code not renaming the index and columns even when code is executing without any error,
considering that the sale Df dataframe is as shown on the right.
>>> saleDf

Target Sales
Zone B 70000 68000

Zone C 75000 78000


Zone D 60000 61000
The code:
saleDf.rename(index = {'zoneC': 'Central', 'zoneD': 'Dakshin'},columns = {'Target': 'Targeted', 'Sales': 'Achieved'})
print(saleDf)
What output would be produced by the above code and what is the problem with the code? What correction/modification
would you suggest for the problem.
Q35) Write the SQL functions which will perform the following operations:
a) To display the name of the weekday for your date of birth
b) To convert e-mail-id to lowercase
c) To count the number of characters in your name
d) To display the first character of your name
e) To calculate the average marks secured by the class
OR
Kabir has created following table named exam:
RegNo Name Subject Marks
1 Sanya CS 98
2 Sanchay IP 100
3 Vinesh CS 56
5 Akshita IP 98
Help him in writing SQL queries to the perform the following task:
a) Insert a new record in the table having following values:
[6,'Khushi','CS',85]
b) To change the value “IP” to “Informatics Practices” in subject column.
c) To remove the records of those students whose marks are less than 30.
d) To add a new column Grade of suitable datatype.
e) To display records of “Informatics Practices” subject.

You might also like