Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 6 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 6 with Solutions
Time: 3 Hrs.
Max. 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.
Section A
Question 1.
State whether the following statement is True or False:
Pandas Series can hold data of multiple types (e.g., integers and strings) in a single Series.
Answer:
False
Question 2.
What does the ORDER BY clause do in SQL?
(a) It deletes rows from a table
(b) It filters rows based on a condition
(c) It sorts the result set in ascending or descending order
(d) It limits the number of rows returned
Answer:
(c) It sorts the result set in ascending or descending order
![]()
Question 3.
What is the primary function of a switch in a network?
(a) Broadcast data to all devices
(b) Filter and forward data to a specific destination
(c) Amplify signals
(d) Convert analog signals to digital
Answer:
(b) Filter and forward data to a specific destination
Question 4.
Which SQL command removes a record from a table
(a) Remove
(b) Delete
(c) Drop
(d) Del
Answer:
(b) Delete
Question 5.
Sunaina’s computer system was not working due to a problem in the CPU, what should she do with it?
(a) Dispose the entire set and buy a new one
(b) Keeping the usable components dispose the unused parts to an e-Waste recycler
(c) Dispose the system casually anywhere
(d) Give it to her sister for play
Answer:
(b) Keeping the usable components dispose the unused parts to an e-Waste recycler
Question 6.
How do you rename a column old_name to new_name in a DataFrame df?
(a) df.rename_column(‘old_name’; ‘new_name’)
(b) df.columns[‘old_name’] = ‘new_name’
(c) df.rename(columns=(‘old_name’: ‘new_name’)
(d) df.replace_column(‘old_name’, ‘new_name’)
Answer:
(c) df.rename(columns={‘old_name’: ‘new_name’})
Question 7.
Which argument keyword can be used to change the style of the plotted line?
(a) line
(b) lines
(c) linestyles
(d) linestyle
Answer:
(d) linestyle
Question 8.
State whether the following statement is True or False:
The SELECT statement can be used without the FROM clause in SQL.
Answer:
True
Question 9.
Which of the following functions is used to import a dataframe from csv file ?
(a) read_csv()
(b) import_csv()
(c) to_csv()
(d) export_csv()
Answer:
(a) read_csv()
Question 10.
Intentionally kept traces of activities done over the web are called ____.
(a) passive digital footprints
(b) data prints
(c) digital traceback
(d) active digital footprints
Answer:
(d) active digital footprints
Question 11.
Fill in the Blank
The primary key is used to uniquely identify ___ in a table.
(c) Constraints
(b) Rows
(c) Constraints
(d) Data types
Answer:
(b) Rows
Question 12.
Mr. Chandervardhanis not able to identify the Domain Name in the given URL.
Identify and write it for him http://www.cbse.nic.in/aboutus.html
(a) cbse.nic.in/aboutus
(b) cbse.nic.in
(c) http://www.cbse.nic.in/aboutus
(d) None of above
Answer:
(b) cbse.nic.in
Question 13.
To display First three rows of a series object ‘M’, you may write:
(a) M.Head()
(b) M.Tail(3)
(c) M.Head(3)
(d) M.head(3)
Answer:
(d) M.head(3)
Question 14.
Snigdha found her image attached to an unknown person and published in a social networking site. What should she do?
(a) Complain the cyber crime cell
(b) Ignore it
(c) Upload more pictures of herself
(d) Try to contact the source
Answer:
(a) Complain the cyber crime cell
Question 15.
Which of the following is not true with respect to series?
(a) The nbytes property returns the number of bytes occupied by a series.
(b) The ndim property returns the number of dimensions of a series.
(c) A series is both size and data modifiable.
(d) A series can be displayed using print() function
Answer:
(c) A series is both size and data modifiable
Question 16.
Match the following SQL clause with their meanings:

Answer:
(b) P-2, Q-3, R-1, S-4
Question 17.
Fill in the Blank
The function used to remove missing data from a Pandas DataFrame is .
(a) dropna()
(b) fillna()
(c) replace()
(d) isnull()
Answer:
(a) dropna()
![]()
Question 18.
Which function is used to set a label for the x-axis in pyplot?
(a) xlabel()
(b) set_x()
(c) x-axis()
(d) xaxi()
Answer:
(a) xlabel()
Question 19.
The combination of two or more interconnected networks is called
(a) Internetwork
(b) LAN
(c) MAN
(d) WAN
Answer:
(a) Internetwork
Directions (Q. Nos. 20 and 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
Question 20.
Assertion (A) The SQL command ALTER TABLE is used to modify the structure of an existing table.
Reason (R) ALTER TABLE can be used to add or delete columns from an existing table.
Answer:
(a) ALTER TABLE allows modification of table structures, such as adding or deleting columns. Hence, Both A and R true and R is the correct explanation of A.
Question 21.
Assertion (A) Data visualisation refers to the graphical representation of information and data using visual elements like charts, graphs and maps etc.
Reason (R) To install matplotlib library, we can use the command pip install matplotlib.
Answer:
(b) Both A and R are true but R is not a correct explanation of A.
Section B
Question 22.
(A) Flow can you read data from a CSV file into a pandas DataFrame? Provide an example.
Or
(B) What is the difference between iloc[] and loc[] in pandas?
Answer:
(A) You can use the pd.read_csv() function to read a CSV file into a DataFrame.
Example:
import pandas as pd
df = pd.read_csv(‘data.csv’)
print(df.head())
Or
(B) iloc[] is used for integer-location-based indexing, whereas loc[] is used for label-based indexing.
Example:
df.iloc[0] # First row using index df.loc[0] # First row using label
Question 23.
Mention any two ways for e-waste management.
Answer:
Two way for e-waste management:
1. Proper disposal through authorized e-waste centers.
2. Reducing consumption by opting for durable products.
Question 24.
Consider the string: “Structured Query Language”. Write suitable SQL queries for the following:
I. To extract and display “Query” from the string.
II. Display the length of the string.
Answer:
I. SELECT SUBSTRING(‘Structured Query Language’, 11, 5) AS ExtractedString;
II. SELECT LEN( ‘ Structured Query Language’) AS StringLength;
Question 25.
(A) Define Voice over Internet Protocol (VoIP). Also, explain its one advantage.
Or
(B) Explain any two uses of the Internet.
Answer:
(A) VoIP (Voice over Internet Protocol) is an IP telephony term for a set of facilities used to manage the delivery of voice information over Internet. It enables a user to make cheap telephone calls over a broadband Internet connection, instead of using a regular telephone service.
A major advantage of VoIP is that avoids the tolls charged by ordinary telephone service.
Or
(B) Two uses of Internet are as follows:
(i) Electronic Mail (E-mail) The first major use of the Internet is E-mail. People used E-mail for sharing information, data files, photos, videos, business communications and any other files instantaneously with others. This had enabled faster communication between people and improve business efficiency.
(ii) E-commerce The Internet enables the selling of goods and services in online mode. There are many E-commerce platform vendors like Amazon, Ola who aggregate several products/services available in the market and sell them through their portal to customers.
![]()
Question 26.
Write few advantages of SQL?
Answer:
The advantages of SQL are:
- SQL is portable i.e it can run on different hardware as well as software platforms.
- SQL queries can be used to retrieve large amounts of records from a database quickly and efficiently.
- It is easy to learn and understand.
- SQL can be used with any DBMS system.
Question 27.
Mention any two precautions that we should follow while we are using social media.
Answer:
Social media precautions:
- Be cautious of phishing and fake accounts.
- Adjust privacy settings to control who can see your posts.
Question 28.
(A) The Python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import pandas as pd
data1 = {'ID': [1, 2, 3], 'Name': [‘Riya', ‘Preeti’, 'Neeta']}
data2 = {'ID': [3, 4, 5], 'Age' [22, 30, 40]}
df1 = Pd.DataFrame(data1)
df2 = Pd.DataFrame(data2)
result = Pd.merge(df1, df2, on=’ID’, how=inner)
print(result)
Or
(B) Complete the given Python code to concatenate the DataFrames ‘df1’ and ‘df2’ vertically and display the resulting DataFrame.
import ____ as pd
df1 = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
df2 = pd.DataFrame({'A': [7, 8, 9], 'B': [10, 11, 12]})
result_df = pd. ___(____)
print(result_df)
Answer:
(A)
import pandas as pd
data1 = {'ID': [1, 2, 3], 'Name':
['Riya'. 'Preeti'. 'Neeta']}
data2 = {'ID': [3. 4. 5], 'Age' [22, 30, 40]}
df1 = pd.DataFrame(data1)
df2 = pd.DataFrame(data2)
result = pd.merge(df1. df2, on='ID', how=’inner')
print(result)
Or
(B)
import pandas as pd
df1 = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
df2 = pd.DataFrame({'A': [7, 8, 9], 'B1: [10, 11, 12]})
result_df = pd.concat([df1, df2], axis=0)
print(result_df)
Section C
Question 29.
Sanya recently installed a new fitness tracking app on her smartphone. She notices that after using the app, she receives targeted ads about fitness equipment and diet plans on her social media accounts. She is concerned about her privacy.
(i) What is happening to Sanya?
(ii) What immediate action should she take to handle it?
(iii) Is there any law in India to handle such issues? Discuss briefly.
Answer:
(i) Sanya’s digital footprint is being tracked, and her data is being used for targeted advertising.
(ii) Sanya should review the app’s privacy settings and permissions, and limit data sharing. She can also use privacy-focused apps and consider a VPN.
(iii) Yes, the Information Technology (IT) Act, 2000, and the upcoming Personal Data Protection Bill provide guidelines on data protection and privacy.
Question 30.
(A) Vijay is a sports analyst and wants to create a dataframe to store the following data: [[P01,’Sachin Tendulkar’, ‘India’],[P02,’Brian Lara’, West Indies’], [P03,’Wasim Akram’, ‘Pakistan’],[P04,’Adam Gilchrist’,’Australia’]]
Each record stores playerid, playername, country. Help him to write a python code to create a dataframe with proper column headings.
Or
(B) Pushp, a student of Class XII, has been assigned a code to create a pandas Series ‘S1’, as shown below,
a 100
b 200
c 300
d 400
e 500
dtype: int64
Help him to write the Python statements for the following.
(i) To extract the value with the index ‘c’.
(ii) Display the series by adding 10 in each value.
(iii) Delete the value against index’d’.
Answer:
(A)
import pandas as pd # Data for players data = [ ['P01', 'Sachin Tendulkar', ’India'], ['P02'. 'Brian Lara', ’West Indies'], [’P03'. 'Wasim Akram', 'Pakistan'], ['P04', 'Adam Gilchrist', 'Australia'] ] # Define column headings columns = ['playerid', 'playername', 'country'] # Create DataFrame df = pd.DataFrame(data, columns=columns) # Display the DataFrame print(df)
Or
(B) (i) pri nt(SI [ ‘ c ’ ])
(ii) print(S1+10)
(iii) S1=S1. drop(‘ d ’)
![]()
Question 31.
I. Write an SQL statement to create a table named PATIENTS with the following specifications:
- PatientID (INTEGER, Primary Key, Auto Increment)
- FirstName(VARCHAR(50))
- LastName (VARCHAR(50))
- DateOfBirth (DATE)
- Height (FLOAT)
Answer:
CREATE TABLE PATIENTS ( PatientID INTEGER PRIMARY KEY AUTOINCREMENT, FirstName VARCHAR(50), LastName VARCHAR(50), DateOfBirth DATE, Height FLOAT );
II. Write an SQL query to insert the following data into the PATIENTS table:
1, John, Doe, 1990-05-15,180.0
Answer:
INSERT INTO PATIENTS (PatientID, FirstName, LastName, DateOfBirth, Height)
VALUES (1, ‘John’, ‘Doe’, ‘1990-05-15’, 180.0);
Question 32.
(A) Consider the following tables SCHOOL and ADMIN:
Table: SCHOOL


Write SQL statements for the following
(i) To display TEACHERNAME, PERIODS of all teachers whose periods are more than 25.
(ii) To display DESIGNATION without duplicate entries from the table ADMIN.
(iii) To display TEACHERNAME, CODE and corresponding DESIGNATION from tables SCHOOL and ADMIN of Male teachers.
Or
(B) Consider the following tables:
Table 1 :
Stock Stock which stores Product ID (Pid), Product Name (PName), Product Category (Category), Product Quantity (Qty), Price (Price)
Table 2:
Stockdetails
Stockdetails which stores Product ID(Pid), Product Quality (Quality), Godown name (Godown).

Write queries with respect to the tables Stock and Stockdetails:
(i) Display each product name and its corresponding godown.
(ii) Display each product name, price and its corresponding quality for only “A1” quality products.
(iii) Display details of all products in descending order of price.
Answer:
32.
Section D [2 × 4 = 8]
Question 33.
ABC Enterprises is selling its products through three salesmen and keeping the records of sales done quarterly of each salesman as shown below:

Company is storing the above information in a CSV file “Qtrly_Sales.csv”. Mr. Rahul is a programmer. Company has given him the responsibility to create the program to visualize the above data. He wrote Python code but he is facing some difficulties. Help him by giving the solutions of following situation:
import pandas as pd

I. Write the suitable code for the import statement in the blank space in the line marked as Statement-1.
II. Write the correct word to read the csv file in the line marked as Statement-2.
III. Write the correct word to select the type of graph in line marked as Statement-3.
IV. Write the correct word to give the heading in line marked as Statement-4.
Answer:
I. matplotlib.pvplot
II. pd.read_csv
III. kind
IV. title
![]()
Question 34.
(A) Army hospital Patna maintains the following table for its patients. They want certain outputs department wise – like the average charges, total number of patients department wise etc. As a database programmer, helps them to get the required outputs.

(i) Display each Dept and the total number of patients in each.
(ii) Display the department wise average Charges.
(iii) Display the total number of unique departments.
(iv) Display the minimum Charges among patients whose name starts with “S” or “R”
Or
(B) Consider the table INTERIORS given below. Write the output for (i) to (iv).

(i) SELECT ItemName, Type FROM INTERIORS WHERE ItemName LIKE ‘R%’.
(ii) SELECT COUNT (DISTINCT Type) FROM INTERIORS;
(iii) SELECT ItemName, Type FROM INTERIORS WHERE DateofStock>‘ 15/11 /2010’;
(iv) SELECT ItemName FROM INTERIORS WHERE Type = ‘Office Table’;
Answer:
(A)(i) SELECT Dept, COUNT(*) FROM Hospital GROUP BY Dept;
(ii) SELECT Dept, AVG(Charges) FROM Hospital GROUP BY Dept;
(iii) SELECT COUNT (DISTINCT Dept) FROM Hospital ;
(iv) SELECT MIN(Charges) FROM Hospital WHERE Pname LIKE “S%” OR Pname LIKE “R%”;
Or
(B)

Section E [3 × 5 = 15]
Question 35.
“Anutulya Creations”-A start-up fashion house has set up its main centre at Kanpur, Uttar Pradesh for its dress designing, production and dress supplying activities. It has 4 blocks of buildings:

Based on the above specifications, answer the following questions.
(i) Out of LAN, WAN and MAN, what type of network will be’formed, if we interconnect different computers of the campus? Justify.
Answer:
A LAN network is formed. LAN or Local Area Network is a network of systems spread in a small area that spans for 500 m to 1km approx. Here, the distance between the offices are maximum 150m.
(ii) Suggest the topology, which should be used to efficiently connect various blocks of buildings within Kanpur centre for fast communication. Also, draw the cable layout for the same.
Answer:
Star topology should be used.
Cable layout

(iii) Suggest the placement of the following device with justification.
(a) Repeater
(b) Switch/Hub
Answer:
(a) Repeater A to S and P to D. Since, the distances between the blocks are 110 m and 150 m
respectively, a repeater will be required to amplify the signals.
(b) Switch/Hub It will be required in all the buildings to connect multiple computers present in them.
(iv) Now-a-days, video-conferencing software is being used frequently by the company to discuss the product details with the clients. Name any one video conferencing software. Also, mention the protocol which is used internally in video conferencing software.
Answer:
Video conferencing softwares Zoom, Google Meet, MS Teams.
Protocol VoIP (Voice over Internet Protocol).
(v) Suggest the suitable place (BLOCK) to house the server, with a suitable reason.
Answer:
The most suitable place (i.e. BLOCK) to house the server is BLOCK D, because it has maximum number of computers.
Question 36.
Ms. Jennifer Christiano wants to create a DataFrame “Football” and perform some operations with it.

(Assume pandas is imported as pd)
(a) Write the output for the following:
(i) Footbal 1 [ ‘Charges’]/2
(ii) Footbal 1 .size
(b) Help her to write the code for the following:
To set the index as ‘R’/P’ and ‘M’, respectively for the three rows.
(c) To change index Label of Football from 0 to Zero and 1 to One.
(d) To make all the charges to 11.9.
(e) Remove the column Charges.
Answer:
(a) (i)0 4.80
1 5.25
2 9.75
(ii) 12
(b) Football.index=[‘R’, ‘P’, ‘M’]
(c) Football.rename (index = {0 : ‘Zero’, 1 : ‘One’, 2 : ‘Two’}, inplace = True)
(d) Footbal1[‘Charges’]=11.9
(e) Football,drop(columns = [‘Charges’])
![]()
Question 37.
(A) Write suitable SQL queries for the following:
I. To display the total quantity of items from the quantity column in the inventory table.
II. To display the first four characters of the model_number column (attribute) in the products table. (Note: The model numbers are stored in the format AB-1234).
III. To display the data from the description column (attribute) in the furniture table, after removing any leading and trailing spaces.
IV. To display the minimum price in the price column (attribute) of the furniture table:
V. To determine the count of distinct categories in the categories column (attribute), of the furniture table.
Or
(B) Write the SQL functions which will perform the following operations:
(i) To display the day of the month of the current date.
(ii) To display the length of string, ” hello “.
(iii) To display the name of the day, e.g., Friday or Sunday from your date of birth, dob.
(iv) To display the string in upper case ‘I love india’.
(v) To compute the 23 using sql function.
Answer:
(A) I. SELECT SUM(quantity) AS
total_quantity FROM inventory;
II. SELECT LEFT(model_number, 4) AS short_model_number FROM products;
III. SELECT TRIM(description) AS
clean_description FROM furniture;
IV. SELECT MIN(price) AS minimum_price FROM furniture;
V. SELECT COUNT(DISTINCT categories)
AS distinct_categories_count FROM furniture:
Or
(B) (i) SELECT DAY(CURDATE());
(ii) SELECT LENGTHC (’hello’ );
(iii) SELECT DAYNAME (dob);
(iv) SELECT UPPER( ’ I love india’);
(v) SELECT 23;