12 INFORMATICS PRACTICES SAMPLE PAPER-1

PREBOARD EXAMINATION (2026-27)

CLASS XII  |  INFORMATICS PRACTICES (065)

SET – 5 (Practice Paper)

Time Allowed: 3 Hours Maximum Marks: 70

General Instructions:

  • Please check this question paper contains 37 questions.
  • All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions.
  • The paper is divided into 5 Sections – A, B, C, D and E.
  • Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
  • Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
  • Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
  • Section D consists of 2 case study type questions (33 to 34). Each question carries 4 Marks.
  • Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
  • All programming questions are to be answered using Python Language only.
  • In case of MCQ, text of the correct answer should also be written.
Q No. Section-A (21 × 1 = 21 Marks) Marks
1 State whether the following statement is True or False:
In Pandas, the ndim attribute of a Series always returns 1, whereas for a DataFrame it returns 2.
1
2 What will be the output of the following SQL query?
SELECT ROUND(3456.78, -2);
(A) 3400        (B) 3500        (C) 3456.78        (D) 3460
1
3 Which networking device converts digital signals from a computer into analog signals for transmission over telephone lines and vice versa?
(A) Switch        (B) Repeater        (C) Modem        (D) Hub
1
4 In SQL, which wildcard character is used with the LIKE operator to match exactly one single character?
(A) %        (B) _        (C) *        (D) ?
1
5 Which of the following is an example of an active digital footprint?
(A) Websites recording your IP address automatically
(B) Search engines storing your browsing history via cookies
(C) Posting a photo or comment publicly on social media
(D) Apps tracking your background location silently
1
6 Which Python statement correctly selects both 'Name' and 'City' columns from a DataFrame df?
(A) df['Name', 'City']
(B) df[['Name', 'City']]
(C) df.select('Name', 'City')
(D) df.loc['Name', 'City']
1
7 Which parameter of Matplotlib’s plt.bar() function is used to change the thickness of the vertical bars?
(A) size        (B) linewidth        (C) width        (D) height
1
8 What will be the result of the following SQL statement?
SELECT SUBSTR('INFORMATICS', 3, 4);
(A) FORM        (B) ORMA        (C) INFO        (D) RMAT
1
9 Which parameter is used in pd.read_csv() to read a file where values are separated by a semicolon (;) instead of a comma?
(A) split=';'        (B) sep=';'        (C) delim=';'        (D) char=';'
10 Which Intellectual Property Right (IPR) protects a company’s unique brand name, logo, or symbol that distinguishes its goods from others?
(A) Patent        (B) Copyright        (C) Trademark        (D) Plagiarism
1
11 Consider the table VEHICLES:
V_No Type Rent
V01SUV2500
V02SedanNULL
V03SUV3000
V04Hatchback1500
What will be the output of: SELECT MIN(Rent), COUNT(DISTINCT Type) FROM VEHICLES;
(A) 1500, 4          (B) 1500, 3          (C) NULL, 3          (D) 2500, 4
1
12 Which software application is used to access, retrieve, and view web pages on the World Wide Web?
(A) Web Server        (B) Web Browser        (C) Router        (D) Compiler
1
13 Predict the output of the following Python code:
import pandas as pd
s1 = pd.Series([2, 4, 6], index=['x', 'y', 'z'])
print((s1 ** 2)['y'])
(A) 4          (B) 8          (C) 16          (D) 36
1
14 What does the letter ‘S’ stand for in the web protocol HTTPS?
(A) Server        (B) Standard        (C) Secure        (D) System
1
15 Which attribute of a Pandas DataFrame df interchanges its rows and columns (transpose)?
(A) df.swap        (B) df.T        (C) df.flip        (D) df.invert
1
16 Match the following SQL Mathematical functions with their correct outputs:
SQL Query Output
P. SELECT POW(2, 3);1. 3
Q. SELECT ABS(-15);2. 8
R. SELECT SQRT(64);3. 15
S. SELECT MOD(19, 4);4. 8
(A) P-2, Q-3, R-4, S-1        (B) P-1, Q-3, R-4, S-2
(C) P-2, Q-1, R-4, S-3        (D) P-3, Q-2, R-1, S-4
1
17 Which Python statement permanently deletes the column 'Temp' from an existing DataFrame df?
(A) del df['Temp']
(B) df.remove('Temp')
(C) df.delete('Temp')
(D) df.drop('Temp', axis=0)
1
18 Which Matplotlib function is used to create a horizontal bar chart?
(A) plt.bar()        (B) plt.barh()        (C) plt.hbar()        (D) plt.hist()
1
19 What is the first or main landing page of a website called that automatically opens when you visit its domain name?
(A) Web Server        (B) Home Page        (C) Search Engine        (D) Bookmark
1
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose the correct option as:
(A) Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion (A)
(B) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct explanation of Assertion (A)
(C) Assertion (A) is True, but Reason (R) is False
(D) Assertion (A) is False, but Reason (R) is True
20 Assertion (A): For any Pandas Series s, s.size and len(s) always return the exact same integer value.
Reason (R): Both s.size and len(s) count the total number of elements in the Series, including any NaN values.
1
21 Assertion (A): In SQL, the WHERE clause cannot be used to filter records using aggregate functions like SUM() or AVG().
Reason (R): The WHERE clause filters individual rows before grouping takes place, whereas the HAVING clause filters groups after aggregation.
1
Q No. Section-B (7 × 2 = 14 Marks) Marks
22 (A) Differentiate between loc[] and iloc[] methods in Pandas DataFrame with a suitable example.
OR
(B) What is a CSV file? Mention any two advantages of storing data in CSV format.
2
23 Rohan downloaded a paid software illegally from a torrent website and distributed copies of it among his classmates.
i) Identify the cybercrime committed by Rohan.
ii) Mention any two ways to prevent such unethical practices.
2
24 Write suitable SQL queries for the following:
I. Display the remainder when 145 is divided by 12.
II. Display the day name (e.g., Monday, Tuesday) for the date '2026-01-26'.
2
25 (A) Differentiate between a Web Server and a Web Browser.
OR
(B) What are Cookies? How can they affect a user’s privacy online?
2
26 Observe the table BOOKINGS given below and answer the questions that follow:
B_ID Guest_Name Room_No Aadhaar_No CheckIn
BK101Aarav2044512-88902026-04-10
BK102Meera305NULL2026-04-10
BK103Aarav1024512-88902026-05-12
BK104Kabir2047890-33212026-05-15
(i) Identify the Primary Key from the above table and justify why Aadhaar_No and Room_No cannot be chosen as Candidate Keys.
(ii) What will be the Degree and Cardinality of this table if 2 columns are added and 1 row is deleted?
2
27 Distinguish between Copyright and Patent on the basis of what they protect and their legal validity. Why is distributing modified proprietary software without permission considered a violation of IPR even if it is shared free of cost? 2
28 (A) Predict the exact output of the following Python code:
import pandas as pd
s1 = pd.Series([10, 20, 30, 40], index=['a', 'b', 'c', 'd'])
s2 = pd.Series([5, 15, 25], index=['b', 'd', 'e'])
res = s1 - s2
print(res[res.notnull()])
OR
(B) Kavya wrote the following Python code to create a DataFrame with custom row and column labels, but it contains four syntax/logical errors. Identify the errors, rewrite the corrected code, and underline the corrections:
import Pandas as pd
data = [['Riya', 88], ['Aman', 92], ['Zoya', 79]]
df = pd.dataframe(data, rows=['S1', 'S2', 'S3'], columns=['Name', 'Marks'])
print(df.iloc['S1':'S2'])
2
Q No. Section-C (4 × 3 = 12 Marks) Marks
29 Ananya received an email claiming her bank account would be suspended within 2 hours unless she clicked a shortened link and verified her net-banking password and OTP. Simultaneously, her college lab replaced 40 old CRT monitors and CPUs and plans to sell them to an unregistered local scrap dealer who burns wires to extract copper.
(i) Identify the cyber threat targeted at Ananya and state the specific section/Act in India that penalizes such cybercrimes.
(ii) Explain two severe environmental and health hazards caused by burning e-waste cables openly.
(iii) Suggest the legally compliant method the college should follow to dispose of its obsolete computers.
3
30 (A) Write a Python program to create a DataFrame SalesDF using a dictionary of Series as shown below, and then write a single statement to display only those quarters where North sales exceeded South sales by more than 500:
    North  South
Q1   4200   3500
Q2   3800   3600
Q3   5100   4400
Q4   2900   3100
OR
(B) Consider a Series Temp storing temperatures of 5 cities: {'Delhi': 42, 'Shimla': 18, 'Mumbai': 33, 'Leh': 9, 'Jaipur': 40}.
Write Python statements to:
(i) Create the Series Temp from the given dictionary.
(ii) Increase the temperature of cities having temperature below 20 by 5 degrees.
(iii) Display the cities in descending order of their updated temperatures.
3
31 (i) Write an SQL statement to create a table named SHIPMENTS with the following specifications:
Column Name Data Type Size Constraint
Ship_IDCHAR6Primary Key
Client_NameVARCHAR35Not Null
Dispatch_DateDATE––
Weight_KgDECIMAL6,2–
Freight_ChargeINT––
(ii) Write a single SQL query to insert a partial record into SHIPMENTS with values 'SHP109' for Ship_ID, 'Apex Logistics' for Client_Name, and 4500 for Freight_Charge (leaving Dispatch_Date and Weight_Kg as NULL).
3
(2+1)
32 (A) Consider the following two tables FLIGHTS and BOOKINGS:

Table: FLIGHTS
F_Code Source Dest Airline Base_Fare
AI-201DelhiMumbaiAir India5500
6E-405DelhiBengaluruIndiGo6200
AI-309MumbaiChennaiAir India4800
UK-812DelhiKolkataVistaraNULL
6E-510MumbaiDelhiIndiGo5100
Table: BOOKINGS
PNR Passenger F_Code Seats
PNR91AnshulAI-2012
PNR92Bhavna6E-4053
PNR93ChiragAI-2011
PNR94DeepakAI-3094
Write SQL queries for the following:
(i) Display Airline and total Base_Fare only for those airlines whose average fare is greater than 5200 (ignoring NULL fares).
(ii) Display Passenger, Airline, and total amount payable (Seats * Base_Fare) as Total_Amount for all flights departing from 'Delhi'.
(iii) Reduce Base_Fare by 15% for all flights operated by 'IndiGo' whose destination is not 'Delhi'.
OR
(B) Predict the exact output of the following SQL queries based on the tables FLIGHTS and BOOKINGS given above:
(i) SELECT Airline, COUNT(*), COUNT(Base_Fare) FROM FLIGHTS GROUP BY Airline;
(ii) SELECT Passenger, Dest FROM FLIGHTS F, BOOKINGS B WHERE F.F_Code = B.F_Code AND Seats >= 2 AND Airline = 'Air India';
(iii) SELECT Source, MAX(Base_Fare) - MIN(Base_Fare) AS Fare_Diff FROM FLIGHTS GROUP BY Source HAVING COUNT(Base_Fare) > 1;
3
33 A meteorological analyst wants to compare the monthly average rainfall (in mm) of two cities, Leh and Shillong, over five months as recorded below:
Month Code 1 2 3 4 5
Leh (mm) 12 15 38 42 18
Shillong (mm) 140 390 520 480 210
Write a complete Python program using Matplotlib to plot a multi-line chart satisfying all the following specifications:
  • Plot Leh with a 'blue' dashed line ('--') and circular markers ('o'), and Shillong with a 'darkgreen' solid line ('-'), triangle-up markers ('^'), and line width 2.5.
  • Replace the numeric Month Codes (1 to 5) on the X-axis with ['May', 'June', 'July', 'August', 'September'].
  • Set the chart title to "MONSOON RAINFALL COMPARISON", X-axis label to "Months", and Y-axis label to "Rainfall (in mm)".
  • Display a legend in the upper right corner and enable grid lines on the plot.
  • Save the generated chart as "monsoon_2026.png" before displaying it on screen.
4
34 (A) A FinTech company maintains a table named LOANS to track customer loans and interest payouts:
Loan_ID Holder_Name Loan_Type Principal Rate Issue_Date
LN-401SiddharthHome45000008.52023-03-19
LN-402AnanyaEducation1200000NULL2024-07-25
LN-403PrashantVehicle8500009.22023-11-08
LN-404NandiniHome60000008.22025-01-14
LN-405HarshvardhanEducation18000007.82024-09-30
Write SQL queries for the following:
I. Display Holder_Name in uppercase along with the last 4 characters of Holder_Name in lowercase for loans issued in the year 2024.
II. Display Loan_Type and average Principal only for those loan types where the total principal exceeds 2500000 and the interest Rate is known (not NULL).
III. Display Loan_ID, Holder_Name, and the numeric month of Issue_Date for holders whose name contains 'an' anywhere and has at least 8 characters.
IV. Display all loan details in descending order of Principal for 'Home' and 'Vehicle' loans issued after '2023-06-01'.
OR
(B) Predict the exact output of the following SQL queries based on the table LOANS given above:
I. SELECT Loan_Type, COUNT(*), COUNT(Rate) FROM LOANS GROUP BY Loan_Type;
II. SELECT MID(Holder_Name, 3, 4), MONTHNAME(Issue_Date) FROM LOANS WHERE Rate IS NULL OR Principal > 5000000;
III. SELECT ROUND(AVG(Principal), -4) FROM LOANS WHERE YEAR(Issue_Date) <> 2024;
IV. SELECT Holder_Name, INSTR(Holder_Name, 'a') FROM LOANS WHERE Loan_Type = 'Education';
4
Q No. Section-E (3 × 5 = 15 Marks) Marks
35 MedCore Diagnostics Pvt. Ltd. is setting up its corporate IT infrastructure at its main campus in Lucknow, which consists of four blocks: Admin (A), Pathology (P), Radiology (R), and DataCenter (D). The company also has a regional branch office in Hyderabad located 1,280 km away.

Number of Computers in Each Block (Lucknow Campus):
Block Name No. of Computers
Admin (A)35
Pathology (P)60
Radiology (R)45
DataCenter (D)160
Shortest Cable Distances Between Blocks (in meters):
Block A to Block P110 m
Block P to Block D65 m
Block D to Block R85 m
Block A to Block R145 m
Block A to Block D130 m
(i) Suggest the most suitable block to house the main server in the Lucknow campus with proper justification.
(ii) Draw the most economical cable layout to connect all four blocks in the Lucknow campus and state the total cable length required.
(iii) Based on your cable layout in (ii), specify between which two blocks a Repeater is strictly required (assuming standard Ethernet signal attenuation occurs beyond 100 meters).
(iv) Which networking device should be installed to connect the Lucknow campus network with the Hyderabad regional office, and what type of network (LAN/MAN/WAN) will be formed between the two cities?
(v) Suggest the most cost-effective and high-speed guided transmission medium to interconnect the blocks inside the Lucknow campus.
5
36 Consider the DataFrame Inventory shown below:
Item Category Stock Unit_Price
P101RouterNetwork143200
P102SSD 1TBStorage256500
P103WebcamPeripheral82400
P104SwitchNetwork194800
P105RAM 16GBMemory304100
Write single-line Python statements using Pandas for each of the following tasks:
I. Display only the Item and Unit_Price of products from row index 'P102' to 'P104' (both inclusive) using label-based indexing.
II. Add a new computed column named Total_Worth equal to the product of Stock and Unit_Price.
III. Display all rows where Category is 'Network' and Stock is greater than 15.
IV. Permanently remove the row labeled 'P103' from the DataFrame Inventory.
V. Export the updated DataFrame Inventory to a CSV file named "updated_stock.csv" without writing the row index labels.
5
37 (A) Write suitable SQL queries for the following:
I. Display the Emp_Code along with the first 3 characters of First_Name concatenated with the last 3 characters of Last_Name in uppercase from the table STAFF.
II. Display the average Marks rounded to 1 decimal place for each Stream from the table RESULTS, excluding streams with fewer than 5 students.
III. Display the Title of all movies in lowercase after removing leading and trailing spaces where the release date (Rel_Date) falls in the month of December from the table MOVIES.
IV. Display the integer remainder when Total_Points is divided by 7 along with the square root of Bonus (rounded to 2 decimal places) from the table PLAYERS.
V.    Display the position of the first occurrence of substring ‘PRO’ and the total character count of Course_Title from the table ACADEMY.
OR
(B) Predict the exact output of the following SQL queries:
I.     SELECT TRUNCATE(7489.678, -2) + POW(2, 4);
II.    SELECT DAYNAME('2026-10-02'), MONTH('2026-10-02');
III.   SELECT LENGTH(LTRIM(' Data Science '));
IV.   SELECT SUBSTR('RELATIONAL DATABASE', -8, 4);
V.    SELECT CONCAT(LOWER(LEFT('PYTHON', 3)), UPPER(RIGHT('pandas', 3)));
5
error: Content is protected !!
Scroll to Top