CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 9 allows you to get rid of exam fear and be confident to appear for the exam.

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Time: 3 hrs
Max. Marks: 70

General Instructions:

  1. This question paper contains five sections, Section A to E.
  2. All questions are compulsory.
  3. Section A have 18 questions carrying 01 mark each.
  4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
  5. Section C has 05 Short Answer type questions carrying 03 marks each.
  6. Section D has 03 Long Answer type questions carrying 05 marks each;
  7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35 against part c only.
  8. All programming questions are to be answered using Python Language only.

Section – A

Question 1.
Intentionally kept traces of activities done over the web are called [1]
(a) passive digital footprints
(b) data prints
(c) digital traceback
(d) active digital footprints
Answer:
(d) active digital footprints

Question 2.
Snigdha found her image attached to an unknown person and published in a social networking site. What should she do? [1]
(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

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Question 3.
While creating a Series, the number of values [1]
(a) should be same as number of indexes
(b) can be more than the number of indexes
(c) can be less than the number of indexes
(d) Both (b) and (c)
Answer:
(a) Should be same as number of indexes

Question 4.
Selling of a software illegally for temporary use as on rent basis is called [1]
(a) renting
(b) softlifting
(c) downloading
(d) counterfeiting
Answer:
(a) Renting

Question 5.
Which of the following function returns only date part from the given date/time argument? [1]
(a) DATE( )
(b) CURDATE( )
(c) DATECUR( )
(d) None of these
Answer:
(a) DATE( )

Question 6.
Which of the following cannot be used to access data from a DataFrame? [1]
(a) loc( )
(b) iloc( )
(c) head( )
(d) getdata( )
Answer:
(d)getdata( )

Question 7.
Sunaina’s computer system was not working due to a problem in the CPU, what should she do with it? [1]
(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 8.
The “T” property can be used on [1]
(a) Series
(b) DataFrame
(c) Both (a) and (b)
(d) invalid parameter
Answer:
(b) DataFrame

Question 9.
Use of electronic means to perform business transactions are related to [1]
(a) e-Commerce
(b) e-Business
(c) e-Shopping
(d) All of these
Answer:
(d) All of these

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Question 10.
What will be returned by the given query ? [1]
SELECT INSTR(‘INDIA’,’DI’);
(a) 2
(b) 3
(c) -2
(d) – 3
Answer:
(b) 3

Question 11.
Which of the following is a text based web browser? [1]
(a) Opera
(b) Lynx
(c) Safari
(d) All of these
Answer:
(b) Lynx

Question 12.
Which of the following function converts the characters of an argument string to the uppercase characters? [1]
(a) UCASE( )
(b) UPPER( )
(c) Both (a) and (b)
(d) None of these
Answer:
(c) Both (a) and (b)

Question 13.
Firewalls are [1]
(a) softwares that destroy viruses
(b) commercial softwares
(c) utilities that filter the entry of malwares
(d) cleaner softwares
Answer:
(c) Utilities that filter the entry of malwares

Question 14.
Choose the correct query to display the length of customer’s name(CNAME) from Customers table. [1]
(a) mysql>SELECT LENGTH(CNAME) FROM Customers;
(b) mysql>SELECT LEN(CNAME) FROM Customers;
(c) mysql>SELECT COUNT(NAME) FROM Customers;
(d) mysql>SELECT COUNT(CNAME) FROM Customers;
Answer:
(a)mysql>SELECT LENGTH(CNAME) FROM Customers;

Question 15.
Which clause is used with aggregate functions? [1]
(a) GROUP BY
(b) SELECT
(c) WHERE
(d) Both (a) and (b)
Answer:
(a) GROUP BY

Question 16.
Which function only removes the trailing space from the characters of a string passed as an argument? [1]
(a)TRIM( )
(b)LTRIM( )
(c) RT RIM( )
(d) Both (a) and (c)
Answer:
(c) RTRIM( )

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Question 17.
Assertion (A) The Internet is a world wide collection of networked computers, which are able to exchange information with each other very quickly. [1]
Reason (R) A gateway is a device that connects dissimilar networks.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(b) Internet is a world wide system of computer networks able to exchange information. A gateway is a device that connects dissimilar networks. A backbone is central interconnecting structure that connects one or more networks.

Question 18.
Assertion (A) Data visualization 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. [1]
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(b) Data visualization is a graphical representation of quantitative information and data by using visual elements. Matplotlib library’s Pyplot is used for data visualization, pip install matplotlib command is used to install matplotlib library.

Section – B

Question 19.
Define Voice over Internet Protocol (VoIP). Also, explain its one advantage. [2]
Answer:
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
Explain any two uses of the Internet.
Answer:
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 20.
Rashmi is a travel agent, she has stored the data of all passengers in a table Travel(PNo, PName,TDate,Km, Coach). She has given the following command to display the name of the traveller whose travel date is in year 2016. She is encountering an error while executing the following query: [2]
SELECT PName, TDate WHERE TDate= ‘2016’ FROM Travel;
Help her in identifying the reason of the error and write the correct query by suggesting the possible correction (s).
Answer:
SELECT PName,TDate FROM Travel WHERE YEAR(TDate)=2016;

Question 21.
Samadrita wants to find the outputs of the following queries using SUBSTRQ and MOD( ) functions. Help her to find the outputs. [2]
(i) SELECT SUBSTRC“testcases”,- 5,3);
(ii) SELECT MOD(17.7,3);
Answer:

SELECT SUBSTR(“testcases”, -5, 3)
cas

The. SUBSTR( ) function extracts certain number of characters from a string . Here the function extracts characters starting from position – 5 and then 3 characters from the right.
(ii)

SELECT MOD (17.7,3)
2.7

The MOD( ) function returns the remainder of division .

Question 22.
Write a program to create a Series object using a dictionary that stores the name and admission no. of students of your school. [2]
Answer:
St={‘Ram’ :2001, ‘Reena’ :2030 , ‘ Ravi’ :2020, ‘ Sameer’ :2018}
S1=pd.Series(St)

Question 23.
Write any two tips to avoid spams. [2]
Answer:
You can use the following guidelines to avoid spam, they are as follows:
(i) Keep your E-mail address private.
(ii) Using appropriate filters to find and alter you about spam.
Or
Intellectural property right means that the person who produces the information is the only one who can use that information. Now, explain the need of protecting intellectual property right.
Answer:
The intellectual property rights must be protected because of protecting them,
(i) encourages individuals and business to create new software and new software applications, as well as improving existing applications.
(ii) ensures new ideas and technologies are widely distributed.
(iii) promotes investment in the national economy.

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Question 24.
Answer the following questions based on the Series given below [2]
import pandas as pd
list1 = [1,2,3,4,5,6,7,8]
list2=[‘swimming’,‘tt‘skating’,‘kho kho’, ‘bb’, ‘chess’, ‘football’, ‘cricket’]
school=pd.Series(1ist1,index=list2)

What will be the output of the following statements?
(a) print (school*2)
(b) print (school[“tt”])
Answer:
(a)

swimming 2
tt 4
skating 6
kho kho 8
bb 10
chess 12
football 14
cricket 16

(b) tt 2

Question 25.
HR department of ABCTech has created following DataFrame to store data about salaries and bonus paid to their employees: [2]
import pandas as pd
import numpy as np
d1={‘EName’:[ ‘Kavita’, ‘Sudha’, ‘Garima’],‘Sal’ : [50000,60000,55000], ‘Bonus’:[3000,4000,5000])
Df1=pd.DataFrame(d1)
Write Python statement using suitable functions for the following tasks:
(a) Display the details of employee Kavita.
(b) Add a new column named ‘Email’ with the value ”abc@gmail.com”.
Answer:
(a) Df1.1oc[Dfl.EName==‘Kavita’]
(b) Dfl[‘Emai1’]= ‘abc@gmail.com’

Section – C

Question 26.
Consider the following table BOOK.
Table: BOOK

Code Title Author Publication Price
D001 Physics Vikas Sharma xxx 250
D002 Chemistry Preeti Goyal yyy 300
D003 Computer Science Swati Rana zzz 275
D004 English Sanjeev Jain aaa 150
D005 Mathematics Rajiv Rastogi bbb 400

Give the output of the following SQL commands on the basis of the above table BOOK.
(i) SELECT LEFT(Publication , 1) FROM BOOK WHERE Price>280;
(ii) SELECT LCASEtAuthor ) FROM BOOK ;
(iii) SELECT SUBSTR (Title, 2, 3) FROM BOOK WHERE Code = ‘D002’;
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 9 Img 1

Question 27.
Write a Python code to create a DataFrame with appropriate column headings from the list given below: [3]
[[P01,’Sachin Tendulkar’,’India,],[P02,’Brian Lara1,’West Indies’],[P03,Wasim Akram’ /Pakistan’], [PCM,’Adam Gilchrist’,’Australia’]]
Answer:
import pandas as pd
data = {“PID”:[“P01”, “P02”, “P03”, “P04”],
“Pname”: [“Sachin Tendulkar”, “Brian Lara”, “Wasim Akram”, “Adam Gilchrist”],
“Country”: [“India”, “West Indies”, “Pakistan”, “Australia”]
df = pd.DataFrame(data)
print(df)

Question 28.
Pushp, a student of Class XII, has been assigned a code to create a pandas Series ‘S1’, as shown below. [3]
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:
(i) print(S1 [‘c’])
(ii) print(S1 + 10)
(iii) S1=S1.drop[‘d’]

Question 29.
Sumit has to prepare a project on “Swachh Bharat Shreshth Bharat”. He decides to get information from the Internet. He downloads three web pages (webpage 1, webpage2, webpage3) containing information on the given topic.
1. He reads a paragraph from webpage 1 and rephrased it in his own words.He finally pasted the rephrased paragraph in his project.
2. He downloaded three images from webpage2. He made a collage for his project using these images.
3. He also downloaded an icon from webpage3 and pasted it on the front page of his project report.
Now, answer the following questions based on above reading. [3]
(i) Step 1 an example of
(ii) Step 3 an act of
(iii) The process of getting web pages, images and files from a web server to local computer is called _____
Answer:
(i) Paraphrasing
(ii) Copyright infringement
(iii) Downloading
Or
What is cyber stalking? Is cyber stalking a crime? How cyber stalking messages are different from ordinary spam?
Answer:
Yes, Cyber stalking is a crime in which the attacker harasses a victim using electronic communication, such as E-mail or Instant Messaging (IM), or messages posted to a website or a discussion group. Cyber stalking messages differ from ordinary spam in that a cyber stalker targets a specific victim with often threatening messages.

Question 30.
Consider the given table Order. [3]
Table: Order

Orderno Orderdate CName Cloc Orders(in ₹) Payments (in ₹)
1 12/02/2008 Avion Delhi 100000 90000
2 21/11/2008 Parason Jaipur 230000 230000
3 15/10/2008 Trident Raipur 120000 100000
4 13/01/2008 Avion Jaipur 240000 240000
5 17/07/2008 Trident Delhi 340000 310000
6 16/06/2008 Nalco Chennai 140000 140000

Write the SQL statements for the following based on above table Order.
(i) Display the maximum and minimum orders placed for each city.
(ii) Find the average of Payments received by Cloc Jaipur.
(iii) List all orders given between 01/01/2008 to 12/10/2008.
Answer:
(i) SELECT Cloc, MAX(Orders), MIN(Orders) FROM Order GROUP BY Cloc;
(ii) SELECT AVG( Payments) FROM Order WHERE Cl oc=’ Jai pur’;
(iii) SELECT * FROM Order WHERE OrderdateVOl/01/2008′ and Orderdate<’12/10/2008’;
Or
Which type of MySQL function accepts only numeric values? What is the use of such functions? Give the name of some functions of that type.
Ans. Mathematical functions accept only numeric values and return the value of same type. These functions are used to perform mathematical operations on the database data. Some mathematical functions are : POWER( ), ROUND( ), TRUNCATE( ).

Section – D

Question 31.
Carefully, observe the following table named ‘Stock’. [5]
Table: Stock

Pid PName Category Qty Price
1 Keyboard l0 15 450
2 Mouse l0 10 350
3 Wifi-router NW 5 2600
4 Switch NW 3 3000
5 Monitor 0 10 4500
6 Printer 0 4 17000

Write SQL queries for the following
(i) To display the records in decreasing order of Price.
(ii) To display Category and category wise total Quantities of products.
(iii) To display the Category and its average Price.
(iv) To display Category and category wise highest Price of the products.
(v) To display product names of the items with price below 200 and quantity less than 5.
Answer:
(i) SELECT * FROM Stock ORDER BY Price DESC;
(ii) SELECT Category, SUM(Qty) FROM Stock GROUP BY Category;
(iii) SELECT Category, AVG(Price) FROM Stock GROUP BY Category;
(iv) SELECT Category, MAX(Price) FROM Stock GROUP BY Category;
(v) SELECT PName FROM Stock WHERE Pnce<2000 and Qty<5;
Or
Briefly explain the purpose of the following SQL functions.
(i) POWER( )
(ii) MOD( )
(iii) NOW( )
(iv) MONTH( )
(v) LENGTH( )
Answer:
(i) POWER( ) function returns the value of a number raised to the power of another number.
(ii) MOD( ) function returns the remainder of a number dividing by another number.
(iii) NOW( ) function returns the system date and time.
(iv) MONTH( ) function extracts the month part of a date.
(v) LENGTH( ) function returns the length of a string value.

CBSE Sample Papers for Class 12 Informatics Practices Set 9 with Solutions

Question 32.
‘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: [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 9 Img 2
Distance between the various blocks:

A to D 50 m
A to P 60 m
A to S 110 m
D to S 60 m
P to S 50 m
P to D 150 m

Number of computers in each block:

Block A 20
Block D 80
Block P 15
Block S 8

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.
(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.
(iii) Suggest the placement of the following device with justification.
(a) Repeater
(b) Switch/Hub
(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.
(v) Suggest the suitable place (BLOCK) to house the server, with a suitable reason.
Answer:
(i) 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 150 m.
(ii) Star topology should be used.
Cable layout
CBSE Sample Papers for Class 12 Informatics Practices Set 9 Img 3
(iii) (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) Video conferencing softwares Zoom, Google Meet, MS Teams. Protocol VoIP (Voice over Internet Protocol).
(v) The most suitable place (i.e. BLOCK) to house the server is BLOCK D, because it has maximum number of computers.

Question 33.
Write a Pandas program to sort the DataFrame first by Name in descending order, then by ‘Score’ in ascending order. [5]
Sample DataFrame :
exam_data={ ‘Name’:[‘Abhi’,‘Chirag’,‘Tarun’,‘Anjali’,‘Mahi’,‘Tushar’,‘Shubham’, ‘Harsh’,‘Vanshika’,‘Kartik’],
‘Score’:[12.5,9,16.5,np.NaN,9,20,14.5,np.NaN,8,19], ‘
‘Attempts’:[1.3,2,3,2,3,1,1,2,1],
‘Qualify’:[‘Yes’,‘No’,‘Yes’,‘No’,‘No’,‘Yes’,‘Yes’,‘No’,‘No’,‘Yes’])
1abels=[‘a’,‘b’,‘c’,‘d’,‘e’,‘f’,‘g’,‘h’,‘i’,‘j’]
Answer:
import pandas as pd
import numpy as np
exam_data = {‘Name’: [‘Abhi’, ‘Chirag’, ‘Tarun’, ‘Anj a 1i’, ‘M a hi’, ‘Tushar’, ‘Shubham’, ‘Harsh’, ‘Vanshika’,‘Kartik’],
‘Score’: [12.5, 9, 16.5, np.NaN, 9, 20, 14.5, np.NaN, 8, 19],
‘Attempts’: [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
‘Qualify’: [‘Yes’, ‘No’, ‘Yes’, ‘No’, ‘No’,‘Yes’, ‘Yes’, ‘No’, ‘No’, ‘Yes’]}
labels = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘ j ’ ]
df = pd . DataFrame(exani_data , index= labels)
print(“Orginal rows:”)
print(df)
result=df,sort_values(by=[‘Name’, ‘Score’], ascending=[False, True])
print(“Sort the DataFrame first by ‘Name’ in descending order, then by ‘Score’ in ascending order:”)
print(result)
Or
Python provides the facility to draw multiple bar charts in same plot. Shrey used this feature and made multiple bar charts in same plot but by mistake the code of graph has deleted. Now help him to write the code of given graph.
CBSE Sample Papers for Class 12 Informatics Practices Set 9 Img 4
Answer:
import numpy as np
import matplotlib.pyplot as plt
groups = 5
boys = (45,23,62,16,33)
girls = (55,18,31,46,29)
fig, ax = pit.subplots( )
index = np.a range(groups)
bar_width =0.35
opacity =0.8
rects1 = pit.bar(index, boys, bar_width,
alpha=opacity,
color=‘Red’,
label=‘Boys’)
rects2 = pit.bar(index + bar_width, girls, bar_width,
alpha=opacity,
color=‘B1ue’ ,
label = ‘ Girls’)
plt.xlabel(‘Person’)
plt.ylabel(‘Scores’)
plt.title(‘Multiple Bar Chart’)
plt.xticks (index + bar_width, ( ‘ G1 ’ , ‘G2’, ‘G3’, ‘G4’, ‘ G5 ’))
plt.legend( )
plt.tight_layout( )
plt.show( )

Section – E

Question 34.
Ms. Jennifer Christiano wants to create a DataFrame “Football” and perform some operations with it. [1+1+2]

Index Player Club Charges
0 Ronaldo AC Milan 9.6
1 Pele Real Madrid 10.5
2 Maradona Royal Argentina Charges

(Assume pandas is imported as pd)
(a) Write the output for the following;
(i) Football [‘Charges’]/2
(ii) Football.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
Or (Option for part (b) only)
To make all the charges to 11.9.
Answer:
(a)
(i) 0 4.80
1 5.25
2 9.75

(ii) 9
(b) Football=Football.reindex([‘R’,‘P’,‘M’ ])
Or
Football[‘Charges’]=11.9

Question 35.
Army hospital Patna maintains the following table for its patients . They want certain outputs departmeiit wise – like the average charges , total number of patients department wise etc. As a database, programmer helps them to get the required outputs. [1+1+2]
Table: Hospital

Patid Pname Dept Charges
P01 Amit ENT 5600
P02 Sunil Eye 7000
P03 Rina Ortho 2500
P04 Akash Ortho 9000
P05 Amitabh ENT 4000
P06 Preeti Ortho 5000

(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.
Or (Option for part (iii) only)
Display the minimum Charges among patients whose name starts with “S” or “R”.
Answer:
(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;
Or
SELECT MIN(Charges) FROM Hospital WHERE Frame LIKE “S%” OR Pname LIKE “R%”;