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

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 4 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 4 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.
e-Waste is becoming one of the fastest growing environmental hazards in the world today. If it is not properly treated or disposed of it can cause serious health hazards, therefore the _____ has issued a formal set of guidelines for proper handling and disposal of e-Waste. [1]
(a) Central Pollution Control Board (CPCB)
(b) Department of Information Technology (DIT)
(c) Waste Electrical and Electronic Equipment (WEEE)
(d) Information Communication Technology (ICT)
Answer:
(a) Central Pollution Control Board (CPCB)

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

Question 2.
There is only 1 day left for Ravisha to submit her Science project. Therefore, she performed the following activities to complete her task. Which of the following activities can be considered as plagiarism? [1]
(a) Downloaded the images that were marked as CC and pasted in her project file.
(b) Copied the content from some website and pasted in her file.
(c) Copied the content from the website and gave references about the same in the project.
(d) Downloaded and installed the open source software for typing the synopsis.
Answer:
(a) Downloaded the images that were marked as CC and pasted in her project file.

Question 3.
Which among the following options can be used to create a DataFrame in Pandas? [1]
(a) A scalar value
(b) An ndarray
(c) A Python diet
(d) All of these
Answer:
(d) All of these

Question 4.
______ stands for malicious software, is designed to infiltrate a computer system without the owner’s informed consent. [1]
(a) Blog
(b) Attachments
(c) Spam
(d) Malware
Answer:
(d) Malware

Question 5.
We can use the aggregate functions in select list or the _____ clause of a select statement. But they cannot be used in a clause. [1]
(a) WHERE, HAVING
(b) GROUP BY, HAVING
(c) HAVING, WHERE
(d) GROUP BY, WHERE
Answer:
(d) GROUP BY, WHERE

Question 6.
In which of the following format, Pandas does not allow reading and writing? [1]
(a) int
(b) float
(c) double
(d) All of these formats are allowed
Answer:
(d) All of these formats are allowed

Question 7.
Which form of Cyber crime refers to offensive comments posted online targeting people? [1]
(a) Cyber bullying
(b) Cyber stalking
(c) Cyber trolls
(d) Both (a) and (b)
Answer:
(d) Both (a) and (b)

Question 8.
Which function is used to delete a row from DataFrame? [1]
(a) DEL( )
(b) DROP( )
(c) DELETE( )
(d) DROPCOL( )
Answer:
(b) DROP( )

Question 9.
What is the name of the network topology in which there are bi-directional links between each possible node? [1]
(a) Ring
(b) Mesh
(c) Tree
(d) None of these
Answer:
(b) Mesh

Question 10.
Find out the output of the following command. [1]
mysql>SELECT DATE(‘1991-04-02 01 : 45 : 55’);
(a) 02
(b) 04
(c) 1991-04-02
(d) 02-04-1991
Answer:
(c) 1991-04-02

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

Question 11.
Arrange the following network in ascending order of their area: [1]
LAN, PAN, WAN, MAN
(a) PAN < MAN < LAN < WAN
(b) PAN < LAN < WAN < MAN
(c) LAN < PAN < MAN < WAN
(d) PAN < LAN < MAN < WAN
Answer:
(d) PAN < LAN < MAN < WAN

Question 12.
Select correct SQL query from below to find the temperature in increasing order of all cites. [1]
(a) SELECT city FROM weather ORDER BY temperature;
(b) SELECT city, temperature FROM weather;
(c) SELECT city, temperature FROM weather ORDER BY temperature;
(d) SELECT city, temperature FROM weather ORDER BY city;
Answer:
(c) SELECT city, temperature FROM weather ORDER BY temperature;

Question 13.
Which of the following is an electronic form of a signature that can be used to authenticate the identity of the sender of a message? [1]
(a) Digital signature
(b) Digital certificate
(c) Firewall
(d) None of these
Answer:
(a) Digital signature

Question 14.
Which of the following command is used to discard unwanted data from a database? [1]
(a) DROP
(b) WHERE
(c) DELETE
(d) ALTER
Answer:
(c) DELETE

Question 15.
SELECT CONCAT (‘Hello’, ‘Wonders’, World’); [1] What will be the output of the above guery?
(a) HelloWondersWorld
(b) hello wonders world
(c) HELLOWONDERSWORLD
(d) Hellowondersworld
Answer:
(a) HelloWondersWorld

Question 16.
The return type of POWER( ) function is [1]
(a) String
(b) Date
(c) Numeric
(d) None of these
Answer:
(c) Numeric

Question 17.
Assertion (A) Privacy of sensitive data can be implemented by encryption. [1]
Reason (R) Encryption hides (Encodes) the details of the Actual data.
(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:
(a) Encryption is the method by which information is converted into secret code that hides the information’s true meaning.

Question 18.
Assertion (A) DataFrames can store heterogeneous data. [1]
Reason (R) DataFrames are immutable.
(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:
(c) DataFrames can store various kinds of data, i.e. heterogeneous data. Also, they are mutable which means they can be changed after creation.

Section – B

Questions 19.
List one function of gateway and switch each. [2] Or What is a computer network? List down the types of computer networks.
Answer:
A switch is a networking device, which is used to connect different LAN segments of a network. A switch also supports packet filtering and forwarding between LAN segments. The gateway is a node in a network, which serves as a proxy server and a firewall system, that prevents the unauthorised access.
Or
Computer network is defined as a group of computers connected to each other by a link. Following are the three main types of computer networks, based upon the geographical area as follows:
(i) Local Area Network (LAN)
(ii) Metropolitan Area Network (MAN)
(iii) Wide Area Network (WAN)

Question 20.
The following query is producing an error. Identify the error and also write the correct query. [2]
SELECT * FROM EMP ORDER BY NAME WHERE SALARY>=5000;
Answer:
As per MySQL, ORDER BY clause must be the last clause in SQL query and in this query, ORDER BY is used before WHERE which is incorrect. The correct query will be
SELECT * FROM EMP WHERE SALARY>=5000 ORDER BY NAME;

Question 21.
Amisha wants to group the result set based on some column’s value. Also, she wants that the grouped result should appear in a sorted order. In which order will she write the two clauses (for sorting and for grouping). Give example to support your answer. [2]
Answer:
When we use GROUP BY clause (for grouping of data) and ORDER BY clause (for sorting data) together, the ORDER BY clause always follows other clauses. That is, the GROUP BY clause will come before OFi-DER BY clause.
For example,
SELECT userid, SUM(score) AS total_score
FROM user _score
GROUP BY userid
ORDER BY userid ASC;

Question 22.
Given the Series A and B. [2]

A
3 0
4 1
7 2
2 3
B
0 10
1 9
2 7
3 4

Write the command to find the difference of Series A and B.
Answer:
import pandas as pd
A=[3,4,7,2]
B=[10,9,7,4]
s1=pd.Series(A)
s2=pd.Series(B)
print(s1-s2)

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

Question 23.
Explain the concept of password cracking and eavesdropping. [2]
Or
List some preventive measures to safeguard your system from virus.
Answer:
The process of attempting to guess or crack passwords to gain access to computer system or network is called password cracking. Crackers will generally use a variety of tools, scripts or software to crack a system’s password.
In computer security, eavesdropping is defined as the unauthorised interception of a conversation, communication or digital transmission in real time. The various forms of communication include phone calls, E-mails, instant messages or any other internet service.
Or
There are many ways, that a virus cannot be entered into your computer. You can follow these guidelines to prevent a virus attack:
(i) Do not open unknown attachments in E-mails or do a virus scan after opening them.
(ii) Download files only from trusted sites.
(iii) Always use an antivirus software program, with both an on-demand and an on-access scanner,
(iv) Update your antivirus regularly.
(v) Regularly update window.
(vi) Always enable the firewall on your computer network.

Question 24.
Answer the following based on the Series given below: [2]
import pandas as pd
list1=[l,2,3,4,5,6,7,8]
1ist2=[‘swimming’,’tt’,’skating’,’kho kho’ , ’ bb ‘ , ‘chess’, ‘footbal1’ , “cricket” ]
school=pd.Series(list1,index=list2)
school.name=(“little”)
What will be the output of
(i) print (school*2)
(ii) print (school [“tt”])
Answer:
(i)

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

(ii) 2

Question 25.
Given a DataFrame “vaccine” store the following: [2]

TokenNo Vaccine Price
0 T567 Covaxin 780
1 T667 Covishield 900
2 T990 Sputnik 1200

Write the Python statement to :
(i) increase the price of the vaccines by 10%.
(ii) price of Sputnik Vaccine.
Answer:
(i) vaccine=vacci ne[ ‘ Price’ ]+ vaccine[ ‘ Price’ ]*10/100
(ii) print(vaccine.iloc[2:,2:]

Section – C

Question 26.
Table : Student [3]

RollNo Name Class DOB Gender City Marks
1 Anand XI 06-06-1997 M Agra 430
2 Chetan XII 07-05-1994 M Mumbai 460
3 Geet XI 06-05-1997 F Agra 470
4 Priti XII 08-08-1995 F Mumbai 492
5 Saniya XII 08-10-1995 F Delhi 360
6 Neha X 08-12-1995 F Burowan 324
7 Nishant X 12-06-1995 M Burdwan 429

Based on above table Student, write the output of the following queries.
(i) SELECT Name FROM Student WHERE City IN(“Agra”,”Mumbai”);
(ii) SELECT * FROM Student WHERE Gender=”F” AND Class=”XII”ORDER BY Marks;
(iii) SELECT Gender, AVG(Marks) FROM Student GROUP BY Gender HAVING Class=”XI’
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 4 Img 4

Question 27.

LED OLED Curved
Samsung SONY Panorama
LG TOSHIBA Weston
BPL TATA Microsoft

Write the Python code to create the above DataFrame ‘tvdf’. [3]
Answer:
import pandas as pd
tvdata={‘LED’:[‘Samsung’,‘LG’.‘BPL’], ‘OLED’: [ ‘Sony’.‘Toshiba’,‘Tata’],
‘Curved’:[‘Panorama’.‘Weston’,‘Microsoft’]}
tvdf=pd.DataFrame(tvdata,columns=[‘LED’,‘OLED’,‘Curved’])
print(tvdf)

Question 28.
Consider the following DataFrame dfn that contain vegetables. [3]

&nbsp; Color Quantity Price
Capsicum Red 12 60
Capsicum Green 22 100
Chilli Red 50 40
Chilli Green 65 55
Lime Green 20 35

Write the code statement to the following:
(i) Find all rows with the label “Chilli”. Extract all columns.
(ii) List 2nd, 3rd and 4th rows.
(iii) List only the columns Quantity and Price using loc.
Answer:
(i) dfn. loc [‘Chilli ‘ , :]
(ii) dfn . iloc [0 : 3, : ]
(iii) dfn. loc [:, [‘Quantity’, ‘Price’]]

Question 29.
Sneha found that her picture posted on a social networking site, has been merged with an unknown person and published. [3]
(i) What should she do?
(ii) Later she found that after posting some images in social media , some people were writing negative messages. This is an instance of ………..
(iii) Using someone’s Twitter handle to post something will be termed as …………
Or
List e-Waste hazards on environment and on human health.
Answer:
(i) Report it to the Cyber crime cell
(ii) Trolling
(iii) Identity theft
Or
e-Waste hazards on the environment are as follows:
(i) Acidification of soil
(ii) Air pollution
(iii) Pollution of ground water
(iv) Landfills with lead and heavy metals
e-Waste hazards on the human health are as follows:
(i) Lung cancer
(ii) DNA damage
(iii) Asthmatic bronchitis
(iv) Chronic damage to the brain
(v) Damage to heart and liver

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

Question 30.
Table : Sales [3]

Column Name
Store ID
Sales_Date
Sales Amount

Write queries to find:
(i) The amount for each store.
(ii) The list of all the store name whose total Sales amount is over 5000.
(iii) The total number of stores in the Sales table.
Or
MySQL is the world’s most popular open source database software. Justify this statement.
Answer:
(i) SELECT SUM(Sales_Amount) FROM Sales GROUP BY Store_ID;
(ii) SELECT Store_ID FROM Sales GROUP BY Store_ID WHERE SUM(Sales_Amount)>5000;
(iii) SELECT COUNT(*) FROM Sales;
Or
MySQL is the world’s most popular open source database software because it supports the basic principles of database and data manipulation used to retrieve, insert and update stored data. It is available to user free or at minimum cost and allows user to use and change the software according to their needs.

Section – D

Question 31.
Write SQL command for questions (i) to (v) on the basis of table Interiors. [5]
Table: Interiors

Itemname Type Dateofstock Price Discount
Red rose Double Bed 23/02/02 32000 15
Soft touch Baby Cot 20/01/02 9000 10
Jerry’s home Baby Cot 19/02/02 8500 10
Rough wood Office Table 01/01/02 20000 20
Comfort zone Double Bed 12/01/02 15000 20
Jerry look Baby Cot 24/02/02 7000 19
Lion king Office Table 20/02/02 16000 20
Royal tiger Sofa 22/02/02 30000 25
Park sitting Sofa 13/12/01 9000 15
Dine Paradise Dining Table 19/02/02 11000 15
White wood Double Bed 23/03/03 20000 20
James 007 Sofa 20/02/03 15000 15
Tom look Baby Cot 21/02/03 Price 10

(i) To show all information about the sofas from the Interiors table.
(ii) To list the Itemname which are priced at more than 10000 from the Interiors table.
(iii) To list Itemname and Type of those items, in which Dateofstock is be 22/01/02 from the Interiors table in descending order of Itemname.
(iv) To display Itemname and Dateofstock of items whose discount is more than 15.
(v) To insert a new row in the table with the following data:
14,” True Indian” , “Office Table”,{28/03/03}, 15000,20
Or
Define the following terms:
(i) INSERT Command
(ii) SELECT Command
(iii) DELETE Command
(iv) DCL Command
(v) WHERE Clause
Answer:
(i) SELECT * FROM Interiors WHERE Type= ‘Sofa’;
(ii) SELECT Itemname FROM Interiors WHERE Price>10000;
(iii) SELECT Itemname, Type FROM Interiors WHERE Dateofstock<’22/01/02′ ORDER BY Itemname DESC; (iv) SELECT Itemname, Dateofstock FROM Interiors WHERE Discount>15;
(v) INSERT INTO Interiors VALUES (14, ‘True Indian’, ‘Office Table’, ’28/03/03’, 15000, 20);
Or
(i) INSERT Command It is used to add a single record or multiple records into a table.
Syntax INSERT INTO (call, cal2 …) VALUES (vail, val2); ,

(ii) SELECT Command It is used to query or retrieve data from a table in the database.
Syntax SELECT column_list FROM table_name;

(iii) DELETE Command To discard unwanted data from a database, the DELETE command is used.
Syntax DELETE FROM WHERE ;

(iv) DCL Command These commands are used to assign security levels in database which involve multiple user setups. They are used to grant defined role and access privileges to the users.

(v) WHERE Clause It is used when you want to retrieve specific information from a table excluding other irrelevent data.

Question 32.
Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (v) below. [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 4 Img 1
Block to block distance (in metre)

Block (From) Block (To) Distance
Human Resource Conference 110
Human Resource Finance 40
Conference Finance 80

Expected number of computers to be in each block

Block Computers
Human Resource 25
Finance 120
Conference 90

(i) Which will be the most appropriate block, where TTC should plan to install their server?
(ii) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient communication.
(iii) Which of the following device will be suggested by you to connect each computer in each of the buildings?
(a) Switch
(b) Modem
(c) Gateway
(iv) What is the advantage of networking?
(v) State the use of repeater.
Answer:
(i) TTC should install its server in finance block as it is having maximum number of computers.
CBSE Sample Papers for Class 12 Informatics Practices Set 4 Img 5
The above layout is based on minimum cable length required, which is 120 metres in the above case.
(iii) (a) Switch
(iv) (a) Application sharing (b) File sharing (c) User communication
(v) Repeater is a device used to amplify the signals.

Question 33.
Write the Python code to plot the graph as shown below: [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 4 Img 2
Or
Observe the following graph and write the Python code to get the desired graph.
CBSE Sample Papers for Class 12 Informatics Practices Set 4 Img 3
Answer:
import matplotlib.pyplot as plt
import numpy as np
# create data
x = np.arange(5)
y1 = [34, 56, 12, 89, 67]
y2 = [12, 56, 78, 45, 90]
y3 = [14, 23, 45, 25, 89]
width = 0.2
# plot data in grouped manner of bar type
plt.bar(x-0.2, yl, width, color=’cyan’)
plt.bar(x, y2, width, color=’orange’)
plt.bar(x+0.2, y3, width, color=’green’)
plt.xticks(x, [‘Team A’, ‘Team B’, ‘Team C’, ‘Team D’, ‘Team E’])
plt.xlabel(“Teams”)
plt.ylabel(“Scores”)
plt.legend([“Round 1”, “Round 2”, “Round 3”])
plt.show( )
Or
import matplotlib.pyplot as plt
movies=(‘Comedy’,‘Action’,‘Romance’,‘Drama’,‘Fiction’)
x_pos=[l,2,3,4,5]
viewers=(12,15,2,6,9)
plt.bar(x_pos.viewers,color=‘magenta ’)
plt.xticks(x_pos.movies)
plt. ylabel(‘Viewers ’)
plt.xlabel(‘Movies’)
plt.title(‘Movies Viewed’)
plt.show( )

Section – E

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

Question 34.
A DataFrame “States” contains data as follows: [1+1+2]

SName Covidcases
Punjab 2090
WB 1600
Kerala 4000

(a) Give the output of
(i) States.loc[States . SName==’ Pun jab ’ ]
(ii) States .tail (1)

(b) Write Python statement to write the DataFrame to CSV file covid.csv.
Or (Option for part (b) only)
Give syntax to access multiple columns of the dataframe.
Answer:
(a)

(i) 0 Punjab 2090
(ii) 2 Kerala 4000

(b)States.to_csv(‘c:\\covid.csv’)
Or
States.iloc[start_column: stop_column]

Question 35.
Table: WORKER [1+1+2]

WNO NAME DOJ DOB GENDER
1001 George K 2013-09-02 1991-09-01 MALE
1002 Ryma Sen 2012-12-11 1990-12-15 FEMALE
1003 Mohitesh 2013-02-03 1987-09-04 MALE
1007 Anil Jha 2014-01-17 1984-10-19 MALE
1004 Manila Sahai 2012-12-09 1986-11-14 FEMALE
1005 R SAHAY 2013-11-18 1987-03-31 MALE
1006 Jaya Priya 2014-06-09 1985-06-23 FEMALE

Based on above table WORKER, write the SQL queries for (i) to (iii).
(i) To display WNO, NAME, GENDER from the table WORKER in descending order of WNO.
(ii) To display the NAME of all the FEMALE workers from the table WORKER.
(iii) To display the WNO and NAME of those workers from the table WORKER, who are born between ‘1987-01-01’ and ‘1991-12-01’.
Or (Option for part (iii) only)
To count and display MALE workers who have joined after ‘1986-01-01’.
Answer:
(i) SELECT WNO, NAME, GENDER FROM WORKER ORDER BY WNO DESC;
(ii) SELECT NAME FROM WORKER WHERE GENDER = “FEMALE”;
(iii) SELECT WNO, NAME FROM WORKER WHERE DOB BETWEEN ‘1987-01-01’ AND ‘1991-12-01’;
Or
SELECT COUNT(*) FROM WORKER WHERE GENDER = “MALE” AND DOJ > ‘1986-01-01’;