Article

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

Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 12 are designed as per the revised syllabus.

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

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions:

  1. This question paper contains five sections, Section A to E.
  2. All questions are compulsory.
  3. Section A has 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 02 questions carrying 04 marks each.
  7. Section E has 03 questions carrying 05 marks each.
  8. All programming questions are to be answered using Python Language only.

Section – A

Question 1.
Sumona has invented a new theory in Physics. She wants to protect it legally against unauthorised use. She should take its ____.
(a) Copyright
(b) Patent
(c) Trademark
(d) None
Answer:
(a) Copyright

Question 2.
The trail that is automatically created when a person uses the internet on any digital devices like Laptops, smartphones, tablets, etc is called ____.
(a) Cyberbullying
(b) Phishing
(c) Digital Footprint
(d) Digital Activity
Answer:
(c) Digital Footprint

Question 3.
Given a Pandas series called Sequences, the command which will display the first 4 rows is
(a) print(Sequences.head(4})
(b) print(Sequences.Head (4))
(c) print(Sequences.heads(4))
(d) print(Sequences.Heads (4))
Answer:
(a) print(Sequences.head(4))

Question 4.
Which of the following does not come inside the Creative Common License?
(a) Movie
(b) Image
(c) Book
(d) Software
Answer:
(d) Software

Question 5.
What is the meaning of Remark LIKE “%5%5%”?
(a) Column Remark begin with two 5s
(b) Column Remark ends with two 5s
(c) Column Remark has more than two 5s
(d) Column Remark has two 5s in it, at any position
Answer:
(d) Column Remark has two 5s in it, at any position

Question 6.
Which Python library is not used for data science?
(a) Panda
(b) Numpy
(c) Matplotlib
(d) Tkinter
Answer:
(d) Tkinter

Question 7.
The software which can be used and copied freely but cannot be modified is _____.
(a) Freeware
(b) Shareware
(c) Proprietary software
(d) Open source software
Answer:
(a) Freeware

Question 8.
To change the 5th column’s value at 3rd row as 35 in DataFrame DF, we can write
(a) DF[4, 6] = 35
(b) DF.iat[4, 6] = 35
(c) DF[3, 5] = 35
(d) DF.iat [3, 5] = 35
Answer:
(d) DF.iat[3, 5] = 35

Question 9.
PHP language is used to create ____.
(a) Dynamic Website
(b) Static Website
(c) Both the types of website
(d) It is not a programming language
Answer:
(c) Both the types of website

Question 10.
Consider the following table namely Employee

Employee_id Name Salary
1001 Misha 6000
1009 Khushi 4500
1018 Japneet 7000

Which of the names will not be displayed by the below given query?
SELECT Name FROM Employee WHERE Employee_id>1009;
(a) Misha, Khushi
(b) Khushi, Japneet
(c) Japneet
(d) Misha, Japneet
Answer:
(a) Misha, Khushi

Question 11.
Which is incorrect?
(a) EULA contains do’s and don’ts with respect to the software being purchased.
(b) Copyright protects the idea itself not its form of expression.
(c) Copyright infringement means using creator’s work without his permission or without paying for it.
(d) Using other’s work without giving him/her citation is called plagiarism.
Answer:
(b) Copyright protects the idea itself not its form of expression.

Question 12.
In SQL, which of the following will select only one copy of each set of duplicate rows from a table?
(a) SELECT UNIQUE
(b) SELECT DISTINCT
(c) SELECT DIFFERENT
(d) All of the above
Answer:
(b) SELECT DISTINCT

Question 13.
When the signal from one wire bleeds into another wire, it is called as
(a) Radio waves
(b) Infrared
(c) Laser
(d) None of these
Answer:
(d) None of these

Question 14.
What will be returned by the given query?
SELECT ROUND(153.669.2);
(a) 153.6
(b) 153.66
(c) 153.67
(d) 153.7
Answer:
(c) 153.67

Question 15.
Consider the following SQL statement. What type of statement is this?
INSERT INTO instructor VALUES (10211, ‘SHREYA’, ‘BIOLOGY’, 69000);
(a) Procedure
(b) DML
(c) DCL
(d) DDL
Answer:
(b)DML

Question 16.
Which operator tests a column for the absence of data(i.e. NULL value)?
(a) Exist Operator
(b) NOT Operator
(c) IS Operator
(d) None of the above
Answer:
(c) IS Operator

Question 17.
Assertion (A) In March 1989, Tim Berners-Lee took the initiative towards the invention of WWW and wrote the first proposal for the World Wide Web.
Reason (R) World Wide Web is a way of exchanging information between computers on the Internet.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false and R is true.
Answer:
(b) Both A and R are true and R is not the correct explanation for A.

Question 18.
Assertion (A) DataFrame is two dimensional data structure which labelled axes i.e. rows and columns.
Reason (R) Columns of DataFrame can be heterogeneous.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false and R is true.
Answer:
(b) Both A and R are true and R is not the correct explanation for A.

Section – B

Question 19.
What is the difference between STAR and BUS topologies?

Or

What is the deference between the http and https websites?
Answer:
STAR Topology is topology in which all the nodes are connected with central computer. But in Bus topology, a single wire runs across the network and all the nodes are connected to the central bus.

Or

http is the normal HyperText Transfer Protocol but https is the Secured HyperText Transfer Protocol.

Question 20.
Identify the problem/issue with the following SQL query :
SELECT house, COUNT(*) FROM Student;
Answer:
The problem with the given SQL query is that there is no GROUP BY clause is given, and thus it will lead to an error. The reason being that the select list use COUNT() function, which is an aggregate function, along with a field. When we use an aggregate function in the select list along with a database field, we need to add a GROUP BY clause. To correct the error it should use GROUP BY clause.
SELECT house, COUNT(*) FROM Student GROUP BY house;

Question 21.
Consider the following SQL string : ‘Preoccupied’. Write commands to display:
(a) ‘occupied’
(b) ‘cup’
Answer:
(a) SELECT SUBSTR(‘’Preoccupied’, 4);
(b) SELECT SUBSTR(”Preoccupied’, 6, 3);

Question 22.
The python code written below has
syntactical errors. Rewrite the correct code and underline the corrections made.

Import pandas as Pd
data = ('A': [1, 2, 3], 'B’: [4, 5, 6]}
df = Pd.DataFrame(data)
result = df[A] + df[B]

Answer:

import pandas as pd
data = {'A': [1, 2, 3], 'B': [4, 5, 6]}
df = pd.DataFrame(data)
result = df[’A'] + df['B']

Question 23.
What are the primary interest of online attackers in spyware?
Answer:
Primary interest of online attackers in spyware is using it to steal personal information for financial crimes such as carding and identity theft or to sell that information to someone else who, then executes more traditional financial crimes.

Question 24.
Complete the given Python code: to given a DataFrame ‘df’, add a new column ‘Total’ that contains the sum of the ‘Math’ and ‘Science’ columns.

import ____ as pd
data = ('Name': ['John', 'Jane', 'Mike', 'Emily'],
'Math': [80, 90, 75, 85],
'Science': [70, 88, 92, 78])
df = pd.DataFrame(____)
df ['Total'] = df ['____'] + df ['____']
print(df)

Answer:

import pandas as pd
data = {'Name': ['John', 'Jane', ’Mike’, 'Emily'],
'Math': [80, 90, 75, 85], 'Science': [70, 88, 92, 78]}
df = pd.DataFrame(data)
df['Total'] = df['Math'] + df['Science’]
print(df)

Question 25.
Consider the following DataFrame dfn :

Write the output of the following statement.
(i) dfn [[‘A’, ’B’]](ii) dfn.loc[‘Purchase’, :]Answer:
(i)

A B
Order 450 180
Purchase 330 550
Sell 250 410
Target 1050 980

(ii)

Question 26.
A relation Vehicles is given below:

Vno Type Company Price Qty
AW125 Wagon Maruti 250000 25
J0083 Jeep Mahindra 4000000 15
S9090 SUV Mitsubishi 2500000 18
M0892 Mini van Datsun 1500000 26
W9760 SUV Meruti 2500000 18
R2409 Mini van Mahindra 350000 15

Write SQL Commands to:
(i) Display the average price of each type of vehicle having quantity more than 20.
(ii) Count the type of vehicles manufactured by each company.
(iii) Display the total price of all the types of vehicles.

Or

Write SQL queries for (i) to (iii), which are based on the following table PARTICIPANTS:

PNO EVENT SNAME CLASS DOB
P1 DEBATE SANYAM 12 2001-12-25
P2 DEBATE SHRUTI 10 2003-11-10
P3 DEBATE MEHER 12 2001-11-10
P4 QUIZ SAKSHI 11 2002-10-12
P5 QUIZ RITESH 12 2001-10-12
P6 QUIZ RAHUL 10 2003-10-12
P7 CROSSWORD AMEER 11 2002-05-09
P8 CROSSWORD MINAKSHI 12 2001-05-09

(i) To display details of all PARTICIPANTS of class 10 and 12.
(ii) To display the SNAME and Class of all PARTICIPANTS in ascending order of their SNAME.
(iii) To display the number of PARTICIPANTS along with their respective CLASS, of every CLASS.
Answer:
(i) SELECT Type, AVG(Price) FROM Vehicle GROUP BY Type HAVING Qty>20;
(ii) SELECT Company, COUNT(DISTINCT Type) FROM Vehicle GROUP BY Company;
(iii) SELECT Type, SUM(Price*Qty) FROM Vehicle GROUP BY Type;

Or

(i) SELECT * FROM PARTICIPANTS WHERE CLASS IN(10,12);
(ii) SELECT SNAME, CLASS FROM PARTICIPANTS ORDER BY SNAME;
(iii) SELECT COUNT(*), CLASS FROM PARTICIPANTS GROUP BY CLASS;

Question 27.
Give an example to create a DataFrame from the list of dictionary. Also, display its output.
Answer:

import pandas as pd
A = {‘0ne’:23, 'Two-, 44, 'Three': 54, ‘Four’ : 77)
B = (‘One’ : 44, ‘Two’ : 75, ‘Three’ : 89, ‘Four’ : 29)
C = (‘One’ : 29, ‘Two’ : 52, ‘Three’ : 63, ‘Four’ : 38)
D = (‘One’ : 12, ‘Two’ : 42, ‘Three’ : 7, ‘Four’ : 16)
data = [A, B, C, D]
df=pd.Data Frame(data)
print(df)

Question 28.
Consider the following DataFrame dfn that contain vegetables.

Color Quantity Price
Capsicum Red 12 60
Capsicum Green 22 100
Chfilli 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.
List any three guidelines to avoid plagiarism.

Or

What are the disadvantages of E-waste recycling?
Answer:

  1. IT Act 2000 is not applicable on the attestation for making will of any body.
  2. Attestation for giving power of attorney of property is not possible via electronic record.
  3. A contract of sale of any immovable property.

Or

Disadvantages of E-waste recycling are as follows

(i) More Pollution and Energy Consumption
It’s contradicting, but the reality is that recycling tons of garbage will require waste to be transported, sorted, cleaned and processed in separate factories, all of which need energy and may result in by-products that can pollute air, water or soil when more trucks are employed to pick up recyclable products.

(ii) Good Products are not Guaranteed
Not all recycled items are of high quality or even safe to use. As previously mentioned, recycled products may contain toxic chemicals that were previously present with the original material.

Question 30.
Reena is working with functions of MySQL. Explain her following:
(i) What is the purpose of NOW( ) function?
(ii) How many parameters does it accept?
(iii) What is the general format of its return type?
Answer:
(i) The NOW( function returns the system date and time.
(ii) 0 parameters
(iii) “YYYY-MM-DD HH: MM : SS”

Section – D

Question 31.
Consider the following table CLUB.

COACH_ID COACH NAME AGE SPORTS Date_of_Joining PAY
1 Rajesh 30 Karate 1999-08-25 1000
2 Anuj 35 Swimming 2000-01-05 750
3 Shuchi 25 Basketball 2005-01-04 1200
4 Reetika 28 Badminton 2002-08-25 1400
5 Virendra 32 Cricket 1996-05-17 1500

Give the answer of the following questions
on the basis of the above table.
(i) Write a query to display the substring of 4 characters of the name of each coach, starting from second character, with their age.
(ii) What will be the output of the following query?
mysql>SELECT CONCAT(COACHNAME,AGE) FROM CLUB WHERE AGE > 30;
(iii) Write a query to display the day for the Date_of_Joining column.
(iv) What will be the output of the following query?
mysql > SELECT PAY *0.25+1000
FROM CLUB
WHERE COACHNAME LIKE ‘R%’;
Answer:
(i) mysql >SELECT SUBSTR (C0ACHNAME, 2, 4), AGE FROM CLUB;

(ii)

(iii) mysql >SELECT DAY (Date_of Joining);

(iv)

Question 32.
Write one Python program to find the following from the given DataFrame DF:

Rollno Name Age Marks
1 Arun 18 68
2 Mohit 14 47
3 Karan 13 78
4 Lai it 16 87
5 Ravi 14 60

(i) Write the statement to display
(a) Maximum marks
(b) minimum marks
(ii) Sum of all the marks
(iii) Mean and mode of age of the students

Or

(Option for part (iii) only)
Count the number of rows present in the DataFrame.
Answer:
(i) (a) print(“Maximum marks =”, DF[“Marks”], max() )
(b) print(“Minimum marks =”, DF[“Marks”].min() )
(ii) print(“Sum of marks =”, DF[“Marks”].sum() )
(iii) print (“Mean of Age =”, DF[“Age”].mean( ) )
print(“Mode of Age =”, DF[“Age”].mode())

Or

print(“No of rows = ”,DF.count())

Section – E

Question 33.
Consider the table EXAM given below. Write the queries for (i) to (v).
Table : Exam

SNo Name Stipend Subject Average Division
1 Karan 400 English 68 1st
2 Aman 680 Mathematics 72 1st
3 Javed 500 Accounts 67 Ist
4 Bishakh 200 Informatics 55 IInd
5 Sugandha 400 History 35 IIIrd
6 Suparna 550 Geography 45 IIIrd

(i) To list the names of those students, who have obtained division as 1st in ascending order of Name.
(ii) To count the number of students, who have either Accounts or Informatics as Subject.
(iii) To display maximum average.
(iv) To display a report listing Name, Subject and annual Stipend received assuming that the Stipend column has monthly stipend.
(v) Identify primary key from given attributes.

Or

Give the output of following commands.
(i) mysql >SELECT TRUNCATE (200.91,1);
(ii) mysql>SELECT LEFT( ‘Swati’ ,4);
(iii) mysql>SELECT CHAR (83, 72, 85, 67, 72, 73);
(iv) mysql>SELECT RTRIM(‘!!!!!Study is important !!!!!’);
Where !!!!! denotes blank spaces
(v) SELECT ROUND (3234.343, 1);
Answer:
(i) SELECT Name FROM EXAM WHERE Division = “Ist” ORDER BY Name;
(ii) SELECT COUNT (*) FROM EXAM WHERE Subject = “Accounts” OR Subject = “Informatics”;
(iii) SELECT MAX (Average) “Highest Average” FROM EXAM;
(iv) SELECT Name, Subject, Stipend * 12 “Stipend” FROM Exam;
(v) SNo

Or

(i) 200.9
(ii) Swat
(iii) SHUCHI
(iv) !!!!! Study is important
(v) 3234.3

Question 34.
Learn Together is an educational NGO. It is setting up its new campus at Jabalpur for its web-based activities. The campus has four compounds as shown in the diagram below:

Centre to centre distance between various compounds as per architectural drawing (in m) is as follows

Main Compound to Resource Compound 110 m
Main Compound to Training Compound 115 m
Main Compound to Finance Compound 35 m
Resource Compound to Training Compound 25 m
Resource Compound to Finance Compound 135 m
Training Compound to Finance Compound 100 m

Expected number of computers in each compound are as follows :

Main Compound 5
Resource Compound 15
Training Compound 150
Finance Compound 20

(i) Suggest a cable layout of connections between the compounds.
(ii) Suggest the most suitable place (i.e. compound) to house the server for this NGO.
Also, provide a suitable reason for your suggestion.
(iii) Suggest the placement of the following devices with justification :
(a) Repeater
(b) Hub/Switch
(iv) The NGO is planning to connect its international office situated in Mumbai, which out of the following wired communication link, will you suggest for a very high speed connectivity?
(a) Telephone analog line
(b) Optical fibre
(c) Ethernet cable
(v) Expand the following:
LAN
PAN
Answer:
(i)

(ii) The most suitable place to house the server is Training Compound as it has maximum number of computers.
(iii) (a) Repeater As per one layout (shown in (i)), the repeater can be avoided as all distances between the compounds are < = 100 m.
(b) Hub/Switch Training compound as it is hosting the server.
(iv) (b) Optical fibre
(v) LAN Local Area Network
PAN Personal Area Network

Question 35.
Write the code for the following graph which display the different style multiline in same plot.

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.

Answer:

import matplotlib.pyplot as
plt x1 = [10, 20, 30]
y1 = [20, 40, 10]
x2 = [10, 20, 30]
y2 = [40, 10, 30]
plt.xlabe1(‘x - axis’)
plt.ylabe1(‘y - axis’)
plt.plot(x1, y1, color=‘black’,
linewidth = 5,
labe1 = ‘line1-dotted’,
linestyle=‘dashed’)
plt.plot(x2, y2, color=‘magenta’, linewidth = 3, label = ‘line2-dashed’, linestyle=‘dotted’)
plt.title(“Plot with different styles”)
plt.legend( )
plt.show( )

Or

import numpy as np
import matplotlib.pyplot as pit
groups = 5
boys = (45, 23, 62, 16, 33)
girls = (55, 18, 31, 46, 29)
fig, ax = plt.subplots( )
index = np.arrange(groups)
bar_width = 0.35
opacity = 0.8
rects1 = plt.bar(index, boys, bar_width, alpha=opacity, color=‘Red’, label=‘Boys’)
rects2 = plt.bar(index + bar_width, girls, bar_width, al pha=opacity, col or=‘ Blue ’, 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()


Show More

Related Articles

यौगिक किसे कहते हैं? परिभाषा, प्रकार और विशेषताएं | Yogik Kise Kahate Hain Circuit Breaker Kya Hai Ohm ka Niyam Power Factor Kya hai Basic Electrical in Hindi Interview Questions In Hindi