Class XII Informatics practices
Preboard-1 Answer key
1. rename() True/False
✔ True
rename() changes column/index names.
2. SELECT ROUND(8.7654,2)
8.7654 → round to 2 decimals → 8.77
✔ Answer: (A)
3. Avoid phishing
✔ Answer: (A) Avoid using antivirus is wrong.
Correct is (C) Do not open unknown email attachments.
4. Function to get rows × columns
✔ Answer: (C) [Link]
Returns tuple → (rows, columns)
5. Device connecting LAN to Internet
✔ Answer: (B) Modem
Modem converts digital ↔ analog.
6. Remainder when 10 ÷ 3
✔ Answer: (B) MOD(10,3) → gives remainder 1.
7. IP protecting brand identity (logo)
✔ Answer: (D) Trademark
8. Default index for Pandas Series
✔ Answer: (D) Consecutive integers starting from 0
9. Primary key + 3 alternate keys
Candidate keys = 1 primary key+ 3 alternate keys
✔ Answer: (D) 4
10. VoIP application
✔ Answer: (E) Internet Telephony
11. Count non-NULL values
✔ Answer: (B) COUNT(column_name)
COUNT(*) counts all rows including NULL.
12. Adding Pandas Series with different indices
✔ Answer: (C) The result has all indices with missing values as NaN
13. In India, the primary law that deals with e-commerce and cybercrime is…
✔ Answer: (C) Information Technology Act, 2000
Explanation: IT Act, 2000 governs cybercrime, electronic records, digital signatures, and e-
commerce activities.
14. SQL command used to sort rows
✔ Answer: (A) ORDER BY
Explanation: ORDER BY arranges rows in ascending/descending order.
15. Python command to select first 3 rows of df with consecutive integer index
✔ Answer: (B) [Link][:2]
Explanation: loc uses labelled index positions.
[Link][:2] → rows 0,1,2.
16. In which network topology is every node directly connected to every other
node?
✔ Answer: (D) Mesh
Explanation: Mesh = every device connected to every other device.
17. INSTR() function in SQL is used to…
✔ Answer: (D) To find the position of a substring in a string
Explanation: INSTR('HELLO','L') → returns position.
18. Which creates an empty DataFrame?
✔ Answer: (C) [Link]()
Explanation: [Link]() returns an empty DataFrame.
19. Which is NOT an aggregate function?
✔ Answer: (D) UPPER()
Explanation: UPPER() is a string function, not aggregate.
20–21 Assertion/Reason
20.
✔ Answer: (A)
Explanation:
print(df) and print([Link][:]) → both show full DataFrame → True
21. INSERT INTO is DML command
✔ Answer: (A)
Assertion True
Reason True
Reason correctly explains Assertion
22. (A) What is a DataFrame? Mention one property.
✔ Answer (sample):
A DataFrame is a 2-dimensional, tabular, labelled data structure in Pandas.
Property: It can contain multiple data types (int, float, string, etc.) in different columns.
22. (B) Difference between Series and DataFrame
✔ Any 2 differences:
1. Series is 1-dimensional, DataFrame is 2-dimensional.
2. Series has one labelled column, DataFrame has multiple columns.
23. What is e-waste?
✔ Answer: Discarded electrical/electronic devices.
Impact: Releases toxic chemicals → soil/water pollution.
24. Create series
Given dates: Jan 1, Feb 28, March 31
Expected code:
import pandas as pd
ser_data = {'January':1,'February':28,'March':31}
s = [Link](ser_data)
print(s)
25. (A) Explain role of a web server
✔ It’s a computer software that accepts client request and responds with required contents.
Role of Web hosting
It is service that stores and maintains a website’s files on a server so that website is accessible
online.
25. (B) Voice over internet protocol(VOIP)
It is a technology that allows people to make voice calls using the internet instead
telephone lines.
One benefit of VoIP
✔ Example: Cost [Link] for long-distance communication.
26. SQL Queries
(i) Display name of day for ‘2026-01-01’
SELECT DAYNAME('2026-01-01');
(ii) Display position of substring 'India' in string 'Incredible India'
SELECT INSTR('Incredible India', 'India');
27. Define digital footprints
1. Digital footprints are the traces or data you leave [Link] we surf the Internet
using smartphones, tablets, computers.
2. It includes websites we visit, emails we send,social media activity,online purchases and more.
3. It helps in tracking online behavior and identity.
Active Digital Footprint
It includes data that we intentionally submit online.
Examples. This would include emails we write, or responses or posts we make on different websites or
mobile Apps, etc.
Passive Digital Footprints
1. The digital data trail we leave online unintentionally is called passive digital footprints.
2. This includes the data generated when we visit a website, use a mobile App, browse Internet
Main Difference:
Active → you deliberately share (posts, comments)
Passive → collected without your knowledge (cookies, tracking)
Ans:-28
StudName Score
0 Abhay 85
1 Ananya 92
2 Javed 88
State Capital
0 Maharashtra Mumbai
2 Kerala Thruvananthapuram
29(I) Explain IPR
1. Intellectual property refers to a creations of mind — inventions, designs, art,
software,symbol,names and images used in commerce.
2. Intellectual Property Rights (IPR)are the legal rights granted to the creator or inventor to
protect their intellectual property from unauthorized use.
3. It helps in data protection through copyrights, patents and trademarks. There are both ethical
and legal aspects of violating IPR. A good digital citizen should avoid plagiarism, copyright
infringement and trademark infringement.
29(II) Rahul’s category
His solar-powered purification system → Patent.
29(III) Importance of IPR
It protects innovation by granting creators control over their innovations, preventing
unauthorized use and ensuring financial reward which encourage creativity and economic
growth.
30 A Create a pandas series using ndarray.
import numpy as np
import pandas as pd
marks = [Link]([85,90,88,78])
subjects = ['Mathematics','Science','English','History']
s = [Link](marks, index=subjects)
print(s)
OR
create pandas dataframe using list of dictionary
import pandas as pd
data = [
{'Course':'Data Science','Duration':12},
{'Course':'Artificial Intelligence','Duration':18},
{'Course':'Web Development','Duration':6}
]
df = [Link](data)
print(df)
31 (I) create student table with following structure
create table students(
studentid numeric primary key,
firstname varchar(20),
lastname varchar(10),
dateofbirth date,
percentage float(10,2)
);
(II)
insert into students values(1,'supriya','singh','2010-08-18',75.5);
Ans:- 32
(I) select department,avg(salary) from payroll group by department;
(II) select designation from payroll order by salary desc;
(III) select emp_name, department from employee natural join payroll;
Ans:- 33
(I) import [Link] as plt
(II) [Link](months, revenue, label='Revenue(in Lacs’))
(III) [Link]('monthly revenue analysis')
(IV) [Link]('monthly_revenue.png')
Ans:- 34
(I) Select lcase(title)from book;
(II) Select max(price) from book;
(III) Select length(title) from book;
(IV) Select bcode,price from book order by price desc;
OR
OUTPUT
(I) Length(MED_NAME)
11
11
7
(II) MED_NAME
IBUROFEN
(III) MED_NAME
PARACETAMOL
COUGH SYRUP
INSULIN
(IV) Max(DEL_DATE)
2023-06-15
Ans:- 35
Server should install in HR department as it has maximum no of computers
Star topology
Switch/hub
WAN will be created as offices are located in different cities.
A dynamic web site is recommended as it can display the dynamic performance data(it differs
from employee to employee) of each employee.
Ans:36
(I) print([Link](2))
(II) print(df['title'])
(III) [Link]('rating', axis=1, inplace=True)
(IV) print([Link][2:4,'title'])
(V) [Link](columns={'Title':'Name'}, inplace=True)
(A) Ans:37
(I) select avg(test_results) from exams;
(II) select right(registration_number,3) from vehicles;
(III) select trim(username) from users;
(IV) select max(salary) from employees;
(V) select count(*) from suppliers;
(B) Ans:37
(I) select round(3.14159,2);
(II) select mod(125,8);
(III) select length('newdelhi');
(IV) select left('informatics practises',5);
(V) select trim(email) from students;