INFORMATICS PRACTICES (065)
Sample Paper 1
Answer Key (Theory)
CLASS XII SESSION: 2024-25
Section-A (21 x 1 = 21 Marks)
1 False 1
2 (C) Sort the result set based on one or more columns 1
3 D. Router 1
4. (B) INSERT 1
5 (B) A cybercrime where an attacker blocks user access to data and demands money 1
6 (A) df.head() 1
7 (B) plt.show() 1
8
9
10
11
12
13
ps False
(B) df.dropna()
(A) Using others persons work without permission or payment
(B) Unique values
(C) Ring
(A) df.tail()
1
1
1
1
1
1
14 (A) Hacking 1
Ki
15 (A) Positional index and labelled index 1
16 (A) P-3, Q-1, R-4, S-2 1
17 (C) Select rows or columns using labels 1
18 (D) Scatter chart 1
19 (D) WAN 1
20 (A) Both A and R are true and R is the correct explanation for A 1
21 (C) A is True but R is False 1
Section-B ( 7 x 2=14 Marks)
22 A DataFrame is a two-dimensional labelled data structure like a table of MySQL. It contains rows and 2
columns, and therefore has both a row and column index. eg.
State GArea VDF
0 Assam 78438 2797.00
1 Delhi 1483 6.72
2 Kerala 38852 1663.00
OR
A Series is a one-dimensional array containing a sequence of values of any data type (int, float, list, string,
etc.) which by default have numeric data labels starting from zero.
© Kips learning Pvt. Ltd 2025
1) Creation from scalar values:
series1 = pd.Series([10,20,30])
OR
2) Creation from NumPy arrays:
array1 = np.array([1,2,3,4])
series3 = pd.Series(array1)
23 Active digital footprints includes data that we intentionally submit online. This would include emails we 2
write, or responses or posts we make on different websites or mobile Apps, etc.
The digital data trail we leave online unintentionally is called passive digital footprints. This includes the
data generated when we visit a website, use a mobile app, browse Internet, etc.
24 SELECT UPPER('Introduction to SQL') AS UpperCaseString; 2
SELECT SUBSTRING('Introduction to SQL', 17, 3)
25 The Internet is the global network of computing devices including desktop, laptop, servers, tablets, mobile 2
phones, other handheld devices as well as peripheral devices such as printers, scanners, etc.
HyperText Markup Language or HTML is a language which is used to design standardised Web Pages so that
the Web contents can be read and understood from any computer across the globe. It uses tags to define
the way a web page is displayed in a browser.
OR
ps A plug-in is a complete program or may be a third-party software. It is a software that is installed on the host
computer, and can be used by the browser for multiple functionalities as well as by other applications. For
example, Flash and Java are plug-ins.
On the other hand, an add-on or extension is not a complete program and so is used to add only a particular
functionality to the browser. Adding the functionality of a sound and graphics card is an example of an add-
on.
26 Primary Key: 2
Ki
A Primary Key uniquely identifies each record in a table.
A table can have only one Primary Key.
The values in a Primary Key column must be unique and NOT NULL.
Foreign Key:
A Foreign Key is used to create a relationship between two tables.
A table can have multiple Foreign Keys.
The values in a Foreign Key column may or may not be unique and can be NULL
27 Anyone who uses digital technology along with Internet is a digital citizen or a netizen. Being a good 2
netizen means practicing safe, ethical and legal use of digital technology. A responsible netizen must abide
by net etiquettes, communication etiquettes and social media etiquettes.
28 import pandas as pd # **Pandas → pandas** 2
D1 = {'Fruit': 'Apple', 'Type': 'Fruit', 'Price': 100}
D2 = {'Fruit': 'Carrot', 'Type': 'Vegetable', 'Price': 50}
D3 = {'Fruit': 'Mango', 'Type': 'Fruit', 'Price': 120} # **Type: Fruit → 'Type': 'Fruit'**
data = [D1, D2, D3]
df = pd.DataFrame(data) # **pd.Dataframe → pd.DataFrame**
print(df) # **Dataframe → df**
© Kips learning Pvt. Ltd 2025
OR
import pandas as pd
data = ['Red Fort', 'Taj Mahal', 'Gateway of India']
indx = ['Delhi', 'Agra', 'Mumbai']
s = pd.Series(data, indx)
print(s)
Q no. Section-C ( 4 x 3 = 9 Marks) Marks
29 I. Improper disposal of e-waste, such as their smartphone, can release harmful metals like lead, 3
which can contaminate food, water, air, or soil, causing lead poisoning that affects the kidneys, brain,
and central nervous system.
II. Ravi's family can recycle the smartphone by contacting companies or NGOs that provide door-to-
door pick-up facilities for collecting e-waste, ensuring that it is handled and recycled properly to
reduce harm to humans and the environment.
III. 3Rs
Reduce: They should reduce the generation of e-waste by using the smartphone to its maximum
capacity and maintaining it well to increase its lifespan.
30
ps Reuse: The smartphone can be donated or sold to someone willing to use it, as reusing slightly old
electronic equipment reduces waste.
Recycle: If the smartphone cannot be reused or repaired, it should be sent to recycling facilities,
where it can be converted into reusable materials.
import pandas as pd
d1 = {'Musician': 'A. R. Rahman', 'Instrument': 'Keyboard'}
d2 = {'Musician': 'Zakir Hussain', 'Instrument': 'Tabla'}
d3 = {'Musician': 'Pandit Ravi Shankar', 'Instrument': 'Sitar'}
3
d4 = {'Musician': 'Hariprasad Chaurasia', 'Instrument': 'Flute'}
Ki
data = [d1, d2, d3, d4]
df = pd.DataFrame(data)
print(df)
OR
import pandas as pd
data = {'Mukesh Ambani': 'Reliance', 'Ratan Tata': 'Tata Group', 'Gautam Adani': 'Adani Group',
'Narayana Murthy': 'Infosys'}
s = pd.Series(data)
print(s)
31 (I) CREATE TABLE SPORTS_TEAMS ( 3
TeamID NUMERIC PRIMARY KEY,
TeamName VARCHAR(30),
Country VARCHAR(20),
CoachName VARCHAR(25),
EstablishedYear YEAR
);
OR
© Kips learning Pvt. Ltd 2025
INSERT INTO SPORTS_TEAMS (TeamID, TeamName, Country, CoachName, EstablishedYear) VALUES
(1, 'Mumbai Indians', 'India', 'Ricky Ponting', 2008);
32 A) 3
I. SELECT City, COUNT(*) AS StudentCount FROM STUDENT GROUP BY City;
II. SELECT Subject, MAX(Marks) AS HighestMarks FROM MARKS GROUP BY Subject ORDER BY
HighestMarks DESC;
III. SELECT StudentName, Subject FROM STUDENT, MARKS WHERE STUDENT.StudentID =
MARKS.StudentID;
OR
B)
I. SELECT Category, COUNT(*) AS ItemCount FROM STATIONERY GROUP BY Category;
ps
Q No.
33
II.
III.
SELECT UPPER(ItemName) FROM STATIONERY;
SELECT ItemName, QuantitySold FROM STATIONERY, SALES WHERE STATIONERY.ItemID =
SALES.ItemID;
import matplotlib.pyplot as plt
Section-D ( 2 x 4 = 16 Marks)
players = ['Messi', 'Ronaldo', 'Neymar', 'Mbappe', 'Haaland']
goals_scored = [5, 8, 6, 7, 9]
# Statement-1
Marks
4
plt.bar(players, goals_scored, label='Goals Scored') # Statement-2
Ki
plt.xlabel('Player Name')
plt.ylabel('Goals Scored') # Statement-3
plt.legend()
plt.title('Goals Scored by Players in Tournament') # Statement-4
plt.show()
34 (A) 4
I. SELECT UPPER(MOVIE_TITLE) FROM MOVIES;
II. SELECT MAX(RATING) FROM MOVIES;
III. SELECT MOVIE_TITLE, LENGTH(MOVIE_TITLE) FROM MOVIES;
IV. SELECT MOVIE_ID, RATING FROM MOVIES ORDER BY RATING DESC;
OR
(B)
I. SELECT POST_CONTENT, LENGTH(POST_CONTENT) FROM SOCIAL_MEDIA_POSTS;
II. SELECT POST_ID, USER_NAME, POST_CONTENT FROM SOCIAL_MEDIA_POSTS WHERE
MONTH(POST_DATE) = 7;
© Kips learning Pvt. Ltd 2025
III. SELECT USER_NAME FROM SOCIAL_MEDIA_POSTS WHERE LIKES_COUNT > 80;
IV. SELECT MAX(POST_DATE) FROM SOCIAL_MEDIA_POSTS;
Q.No. SECTION E (2 X 5 = 10 Marks) Marks
35 I. The server should be installed in the HR department as it has the most number of computers. 5
II. Star topology
III. Switch/Hub
IV. WAN (Wide Area Network) will be created as the offices are located in different cities.
V. A dynamic website is recommended as it can display the dynamic performance data (which
36
37
ps differs from employee to employee) of each employee.
I. print(df.head(3))
II. print(df['Title'])
III. df = df.drop('Year', axis=1)
IV. print(df.loc[2:4, 'Title'])
V. df.rename(columns={'Title': 'Name'}, inplace=True)
I. SELECT AVG(height) FROM Students;
5
5
II. SELECT RIGHT(book_id, 4) FROM Books;
III. SELECT TRIM(author_name) FROM Authors;
Ki
IV. SELECT AVG(marks) FROM Exams;
V. SELECT COUNT(*) FROM Events;
OR
I. SELECT ROUND(3.14159, 3);
II. SELECT MOD(567, 10);
III. SELECT LENGTH('Artificial Intelligence');
IV. SELECT LEFT('DataScience', 3);
V. SELECT TRIM(contact_number) FROM Employees;
© Kips learning Pvt. Ltd 2025