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

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 6 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 6 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.
_____ is a set of moral principles that governs the behaviour of a group or an individual and regulates the use of computers. [1]
(a) Copyright
(b) Computer ethics
(c) Property rights
(d) Privacy law
Answer:
(b) Computer ethics

Question 2.
The term e-Waste can also be called as [1]
(a) WEEE
(b) WEST
(c) WET
(d) None of these
Answer:
(a) WEEE (Waste Electrical and Electronic Equipment)

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

Question 3.
Pandas is a [1]
(a) package
(b) language
(c) library
(d) software
Answer:
(c) library

Question 4.
The term plagiarism is not related to [1]
(a) illegal software copy
(b) illegal use of patents
(c) stealing others E-mail password
(d) None of these
Answer:
(c) stealing others E-mail password

Question 5.
Which of the following is not an aggregate function? [1]
(a) AVG( )
(b) ADD( )
(c) MAX( )
(d) COUNT( )
Answer:
(b) ADD( )

Question 6.
The module that is required to create a Series is [1]
(a) matplotlib
(b) pyplot
(c) pandas
(d) random
Answer:
(c) pandas

Question 7.
Code of the software will be protected by [1]
(a) copyright
(b) patent
(c) registered trademark
(d) None of these
Answer:
(a) copyright

Question 8.
The columns of DataFrame can be [1]
(a) heterogeneous
(b) homogeneous
(c) Both (a) and (b)
(d) None of these
Answer:
(a) heterogeneous

Question 9.
What can you do with the Internet? [1]
(a) Exchange information with friends and colleagues.
(b) Access pictures, sounds, video clips and other media elements.
(c) Find diverse perspective on issues from a global audience.
(d) Exchange information, access pictures, find diverse perspective on issue from a global audience.
Answer:
(d) Exchange information, access pictures, find diverse perspective on issue from a global audience.

Question 10.
If emp_id contain the following set {9, 7, 6, 4,3, 1,2}, what will be the output on execution of the following MySQL statement? [1]
SELECT emp_id
FROM person ORDER BY emp_id;
(a) {1, 2, 3, 4, 6, 7, 9}
(b) {2, 1, 4, 3, 7, 9, 6}
(c) {9, 7, 6, 4, 3, 1, 2}
(d) None of these
Answer:
(a) {1, 2, 3, 4, 6, 7, 9}

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

Question 11.
Home page helps viewers to find out what they can find on the particular site. Home page is the [1]
(a) first page of a website
(b) index page
(c) about page
(d) None of these
Answer:
(a) first page of a website

Question 12.
Which of the following is a valid SQL statement? [1]
(a) SELECT MIN(pub_date) FROM books GROUP BY category HAVING pub_id = 4;
(b) SELECT MIN(pub_date) FROM books ORDER BY category = ’COOKING’;
(c) SELECT COUNT!*) FROM orders WHERE customer# = 1005;
(d) SELECT MAX(COUNT!customer#)) FROM orders GROUP BY customer#;
Answer:
(a) SELECT MIN(pub_date) FROM books GROUP BY category HAVING pub_id = 4;

Question 13.
Which of the following is an open source license? [1]
(a) GNU
(b) BSD
(c) Apache
(d) All of these
Answer:
(d) All of these

Question 14.
Find odd one out. [1]
(a) GROUP BY
(b) DESC
(c) ASC
(d) ORDER BY
Answer:
(a) GROUP BY

Question 15.
Which of the following function count all the values except NULL? [1]
(a) COUNT(’)
(b) COUNT(column_name)
(c) COUNT(NOT NULL)
(d) COUNT(NULL)
Answer:
(a) COUNT(’)

Question 16.
What is the meaning of “GROUP BY” clause in MySQL? [1]
(a) Group data by column values
(b) Group data by row values
(c) Group data by column and row values
(d) None of these
Answer:
(a) Group data by column values

Question 17.
Assertion (A) Digital footprint is the trail of data we leave behind when we visit any website (or use any online application or portal) to fill-in data or perform any transaction. [1]
Reason (R) While online, all of us need to be aware of how to conduct ourselves, how best to relate with others and what ethics, morals and values to maintain.
(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) Code of good behaviour on the Internet which includes such as E-mail, social media,online chat, web forums, website comments and other types of online communication is called as Netiquettes.

Question 18.
Assertion (A) DataFrame.count() function will display the sum of the values from the data frame. [1]
Reason (R) axis=0 .argument is to used to find sum column-wise.
(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) The count( ) method counts the number of not empty values for each row, or column if you specify the axis parameter as axis=’columns’ , and returns a Series object with the result for each row (or column).

Section – B

Question 19.
Sahil, a Class X student, has just started understanding the basics of Internet and web technologies. He is a bit confused in between the terms “World Wide Web” and “Internet”. Help him in understanding both the terms with the help of suitable examples of each. [2]
Or
Ruhani wants to edit some privacy settings of her browser. How can she accomplish her task?
Answer:
World Wide Web (WWW) is a set of programs, standards and protocols that allows the multimedia and hypertext files to be created, displayed and linked on the Internet, e.g. www.microsoft.com, www.amazon.com, etc.

Internet is a computer-based world wide communications network, which is composed of large number of smaller interconnected networks.e.g. Web, E-mails, Social media, etc. While Internet is a collection of computers or networking devices connected together. WWW is a collection of documents, linked via special links called hyperlinks. WWW forms a large part of Internet but is not the Internet.
Or
She can accomplish her task by performing following steps:
Step 1 Open your web browser.
Step 2 Open browser settings.
Step 3 Look for Privacy and Security settings. If not directly found, click on Advanced settings.
Step 4 After reaching Privacy and Security settings, she can edit their setting.

Question 20.
Shanya Khanna is using a table EMPLOYEE. It has the following columns. [2]
Admno, Name, Agg, Stream [column Agg contains Aggregate marks]
She wants to display highest Agg obtained in each Stream.
She wrote the following statement:
SELECT Stream, MAX(Agg) FROM EMPLOYEE:
But she did not get the desired result. Rewrite the above query with necessary changes to help her get the desired output.
Answer:
SELECT Stream, MAX(Agg)
FROM EMPLOYEE
GROUP BY Stream;

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

Question 21.
What do you understand by degree and cardinality of a table? Give an example. [2]
Answer:
Degree Number of columns/attributes/fields in a table are called table’s degree. Cardinality Number of rows/tuples/records in a table are called table’s cardinality. For example,

Bookno Name Author Price
B01 Good learning Xion Z. 220
B02 Smile easy T.Singh 350
B03 I to U S.Sandeep 250

Degree is 4 because it has 4 columns and cardinality is 3 because it has 3 rows.

Question 22.
Write a program to create a Series of object using a dictionary product that stores Productnumber, Product_name, Price [2]
Answer:
import pandas as p
product={‘Pno’:1,‘Pname’:‘Pen’.‘Price’:20}
s1=p.Series(product)
print(s1)

Question 23.
What are the disadvantages of e-Waste recycling? [2]
Or
What is software piracy? Name any three types of law that can help to restrict software piracy.
Answer:
Some disadvantages of e-Waste recycling are as follows :
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.

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.
Or
Software Piracy refers to the unauthorised duplication of computer software. The following are the three types of law that can help to restrict software piracy:
(i) Copyright
(ii) Patent
(iii) Trademark

Question 24.
Consider the following Series named animal: [2]
L Lion
B Bear
E Elephant
T Tiger
W Wolf
dtype : object
Write the output of the command.
print(animal[:: -3])
Answer:
W Wolf
B Bear
dtype: Object

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

Question 25.
Given a code : [2]
Numseries = pd.Series ([12,14,16])
Write the Python command to:
(i) Display the double of each element of Series.
(ii) Display all odd values of Series.
Answer:
(i) print(Numseries*2)
(ii) print(Numseries [Numseries%2!=0])

Section – C

Question 26.
Consider the table PERSONS given below. Write output for queries (i) to (iii). [3]
Table: PERSONS

PID SurName FirstName Gender City PinCode Salary
1 Sharma Geet F Udhamwara 182141 50000
2 Singh Surinder M Kupwara Nagar 193222 75000
3 Jcob Peter M Bhawani 185155 45000
4 Alvis Thomas M Ahmed Nagar 380025 50000
5 Mohan Gaurav M Nagar Coolangatta 390026 33000
6 Azmi Simi F New Delhi 110021 40000
7 Kaur Manpreet F Udhamwara 182141 42000

(i) SELECT SurName FROM PERSONS WHERE Salary > = 50000;
(ii) SELECT SUM (Salary) FROM PERSONS WHERE Gender = ‘F’;
(iii) SELECT Gender, MIN (Salary) FROM PERSONS GROUP BY Gender;
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 6 Img 1

Question 27.
Given below is the data for Sales made in year 2000,2010,2015 and 2020 by three employees. [3]
Emp=[[‘Ram*,5,10,12,14],[‘Shyam’,6,7,8,18],[‘Sita’,7,18,19,20]]
Write a Python program to create a DataFrame for the above data by giving suitable column headings.
Answer:
import pandas as pd
data = {‘ 2000’ :[5,6,7], ‘ 2010’ :[10,7,18], ‘ 2015’ : [12,8,19], ‘ 2020’ : [14,18,20]
dt = pd.DataFrame (data, index =[‘Ram’, ‘Shyam’, ‘Sita’])
print(df)

Question 28.
Amit wants to create a DataFrame df whose columns store following data about his friends: [3]

RollNo Name Email
1 Kailash kai@gmail.com
2 Rima rim@gmail.com
3 Sunil sun@gmail.com

Write the Python command to
(i) Display the second row.
(ii) Alter the position of column Name and E-mail.
(iii) Export the DataFrame to CSV file named friends.
Answer:
(i) df. loc[2,: ]
(ii) df=df [ ‘ Email’, ’ Name ’ ]
(iii) df.to_csv(“friends.csv”)

Question 29.
XYZ Company developed software, related to face recognition with a team of 15 software developers. XYZ company registered the software with a face symbol to easily recognize their software. Before approval of software by the registering firm, Rohit one of the team member of the software published the same software in internet under different name as it is his own development.

XYZ firm recognized this activity and informed to the police. The police people arrested the Rohit and removed the software from the internet. Police advice the XYZ firm to apply for patent as the software is a new invention. [3]
Answer the following questions

(i) XYZ firm registered the software with face symbol to easily recognize their software .In this context, face symbol is called as _____
(ii) The activities done by the Rohit is called as _____
(iii) Among the following options which is automatically granted to XYZ Company
(a) Trademark
(b) Patent
(c) Copyright
(d) None of these
Or
Define the content management system of digital property right. List three factors about the reason behind plagiarism. .
Answer:
(i) Trademark
(ii) Plagiarism
(iii) (c) Copyright
Or
Content management system is the back end of our website, check who has access to this section of our website, and make sure that they don’t have unrestricted access to the site.
Three major factors about the reasons behind plagiarism are
(i) Being lazy
(ii) Lack of enforcement
(iii) Fear of failure

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

Question 30.
Consider the following table GARMENT, write SQL commands for the statements (i) to (iii). [3]
Table: GARMENT

GCODE DESCRIPTION PRICE FCODE READYDATE
10023 PENCIL SKIRT 1150 F03 19-DEC-08
10001 FORMAL SHIRT 1250 F01 12-J A N-08
10012 INFORMAL SHIRT 1550 F02 06-JUN-08
10024 BABY TOP 750 F03 07-APR-07
10090 TULIP SKIRT 850 F02 31-MAR-07
10019 EVENING GOWN 850 F03 06-JUN-08
10009 INFORMAL PANT 1500 F02 20-OCT-08
10007 FORMAL PANT 1350 F01 09-MAR-08
10020 FROCK 850 F04 09-SEP-07
10089 SLACKS 750 F03 20-OCT-08

(i) To display GCODE and DESCRIPTION of each GARMENT in descending order of GCODE.
(ii) To display the details of all the GARMENT, which have READYDATE in between 08-DEC-07 and 16-JUN-08 (inclusive if both the dates).
(iii) To display the average PRICE of all the GARMENT which are made up of fabric with FCODE as F03.
Or
Describe different kinds of SQL command with proper examples.
Answer:
(i) SELECT GCODE, DESCRIPTION FROM GARMENT ORDER BY GCODE DESC;
(ii) SELECT * FROM GARMENT WHERE READYDATE BETWEEN ‘08-DEC-07’ AND ’ 16-JUN-08’ ;
(iii) SELECT AVG (PRICE) FROM GARMENT WHERE FCODE = ‘ F03’;
Or
Types of SQL commands are as follows:
(i) Data Definition Language (DDL) DDL changes the structure of the table like creating a table, deleting a table, altering a table, etc. All the command of DDL are auto-committed that means it permanently saves all the changes in the database. Here are some commands that come under DDL:
CREATE
ALTER
DROP

(ii) Data Manipulation Language (DML) DML commands are used to modify the database. It is responsible for all form of changes in the database. The command of DML is not auto-committed that means it cannot permanently save all the changes in the database. They can be rollback.
Here are some commands that come under DML:
INSERT
UPDATE
DELETE

(iii) Data Control Language (DCL) DCL commands are used to grant and take back authority from any database user. Here are some commands that come under DCL:
GRANT
REVOKE

Section – D

Question 31.
Akhilesh a clerical staff in a Doctor’s Dispensary. He maintains records of visiting doctors in a table Doctor. He wants to analyse some data and find some results such as total number of doctors of certain departments, average charges in some departments etc. Help him in writing proper queries to get the results. [5]
Table: Doctor

Dld Dname Dept Charges VisitDays
D01 R. Sharma ENT 1000 Mon
D02 D. Basak ENT 1500 Wed
D03 M. Agarwal PAED 6000 Sat
D04 E. Joseph Ortho 1200 Sun
D05 M. Fernandes Ortho 4000 Thu

(i) To display the maximum Charges among the Ortho Doctors.
(ii) To display the doctor names in uppercase along with their department names concatenated.
(iii) To display each department and the total number of doctors in them.
(iv) To display each department and the average charges of each.
(v) To display the detail of doctor whose department is ENT.
Or
Explain the use of the following functions:
(a) ORDER BY Clause
(b) HAVING Clause
(c) MIN( )
(d) LOWER( )
(e) AVG( )
Answer:
(i) SELECT MAX(Charges) FROM Doctor WHERE Dept=“0rtho”;
(ii) SELECT CONCAT(UCASE( Dname), Dept) FROM Doctor;
(iii) SELECT Dept,COUNT(*) FROM Doctor GROUP BY Dept;
(iv) SELECT Dept, AVG(Charges) FROM Doctor GROUP BY Dept;
(v) SELECT*FROM Doctor WHERE Dept = “ENT”;
Or
(a) ORDER BY Clause The ORDER BY clause is used to sort the result set along a specified column. The ORDER BY clause sorts the records in ascending order by default.
If you want to sort the records in descending order, you can use the DESC keyword.
Syntax SELECT column_name(s)
FROM table_name
ORDER BY column_name(s) ASC/DESC;

(b) HAVING Clause The HAVING clause can be used only with the SELECT statement. HAVING is applied to summarised rows (summarised with GROUP BY). In which the completed data is firstly fetched and then separated according to condition. The HAVING clause was added to MySQL because the WHERE keyword could not be used with aggregate functions.
Syntax SELECT columnl, column2
FROM tablel, table2
WHERE [ conditions ]
GROUP BY columnl, column2
HAVING [ conditions ]
ORDER BY column1, column2;

(c) MIN( ) This function returns the smallest value from the selected column.
SyntaxSELECT MINI column_name) FROM table_name;

(d) LOWER( )/LCASE( ) This function converts the characters of an argument string to the lowercase characters. The return value has the same data type as the argument.
Syntax LOWER(str/column_name)
or LCASE(str/column_name)
e.g. mysql> SELECT LOWER!’MYSQL’);
The above query produces the following output:

LOWER(‘MYSQL’)
mysql

(e) AVG( ) This function returns the average value of a specified column.
SyntaxSELECT AVG(column_name) FROM table_name;
e.g. Write a query to display the average pay of coaches.
mysql> SELECT AVG(Pay) FROM Club;

Question 32.
Bhartiya Connectivity Association is planning to spread their offices in four major cities of India to provide regional IT infrastructure support in the field of education and culture. The company has planned to set up their head office in New Delhi in three locations and have named their New Delhi offices as Front Office, Back Office and Work Office. The company has three more regional offices as three major cities of India. A rough layout of the same is as follows: [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 6 Img 2
Approximate distances between these offices as per network survey team is as follows:

Place from Place to Distance
Back Office Front Office 10 m
Back Office Work Office 70 m
Back Office East Office 1291 m
Back Office West Office 790 m
Back Office South Office 1952 m

In continuation of the above, the company experts have planned to install the following number of computers in each of their offices.

Back Office 100 Front Office 20
Work Office 50 East Office. 50
West Office 50 South Office 50

(i) Suggest the network type (out of LAN, MAN, WAN) for connecting each of the following set of the their offices.
(a) Back Office and Work Office
(b) Back Office and South Office

(ii) Which device will you suggest to be procured by the company for connecting all the computers with each of their offices out of the following devices?
(a) Switch/Hub
(b) Modem

(iii) Suggest the cable/wiring layout for connecting the company’s local offices located in New Delhi. Also, suggest an effective method for connecting the company’s regional offices East Office, West Office and South Office with offices located in New Delhi.

(iv) Data is converted in a form so as to travel over telephone lines using this device.

(v) Network device that sends the data over optimising paths through connected loop is
(a) gateway
(b) hub
(c) router
(d) bridge
Answer:
(i) (a) The type of network between the Back Office and the Work Office is LAN (Local Area Network).
(b) The type of network between the Back Office and the South Office is WAN (Wide Area Network).
(ii) (a) The suitable device for connecting all the computers in each of their offices is switch/hub.
(iii) The suggested layout for connection is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Set 6 Img 4
(iv) MODEM
(v) (c) Network device that sends the data over optimising paths through connected loop is router.

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

Question 33.
Write the code in Pandas to create the following DataFrames [5]

df1 df2
Mark1 Mark2 Mark1 Mark2
0 30 20 0 10 15
1 40 45 1 20 25
2 15 30 2 20 30
3 40 70 3 50 30

Write the commands to do the following operations on the dataframes given above:
(i) To display both the dataframes.
(ii) To add dataframes df1 and df2.
(iii) To subtract df2 from df1.
(iv) To rename column Mark1 as Marks1 in both the dataframes df1 and df2.
(v) To change index label of df1 from 0 to zero and 1 to one.
Or
Given a plot below, write the Python code to plot the graph.
CBSE Sample Papers for Class 12 Informatics Practices Set 6 Img 3
Answer:
import numpy as np
import pandas as pd
df1 = pd.DataFrame({‘Mark1’:[30,40,15,40],
‘Mark2′:[20,45,30,70]})
df2 = pd.Data Frame({‘Mark1’:[10,20,20,50],
‘Mark2’:[15,25,30,30]})
(i) print(df 1)
print(df2)

(ii) print (df1.add(df2))
(iii) print(df1.subtract(df2))
(iv) df1.rename (columns = {‘Mark1’ : ‘Marks1’}, inplace = True)
(v) df1.rename (index = {0 : ‘zero’, 1 : ‘one’ }, inplace = True)
Or
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
import matplotlib.pyplot as plt
data = [[30, 25, 50, 20, 23], [40, 23, 51, 17, 10], [35, 22, 45, 19, 19]]
X = np.arange (5)
fig = plt. figure( )
plt = fig.add_axes ([0,0,1,1])
plt.bar (X + 0.00, data [0], color = ‘b’, width = 0.25)
plt.bar (X + 0.25, data [1], color = ‘g’, width = 0.25)
plt.bar (X + 0.50, data [2], color = ‘r’, width = 0.25)

Section – E

Question 34.
Given a DataFrame Traindf: [1+1+2]

Index Trainno Tname Fare
0 12378 Padatik 8900
1 12344 Rajdhani 2900
2 12450 Gitanjali 5600

(a) Predict the output of the following Python statement.
(i) print(Traindf.1oc[2,”Fare”]%2)
(ii) del Traindf [‘Fare’]
print (Traindf)

(b) Write the command that displays output as 9.
Or (Option for part (b) only)
Write the command to display second row only.
Answer:
(a) (i) 0
(ii)

Index Trainno Tname
0 12378 Padatik
1 12344 Rajdhani
2 12450 Gitanjali

(b) Traindf.size
Or
Traindf.iloc[1:2]

Question 35.
Consider the table FANS: [1+1+2]
Table: FANS

FAN_ID FAN_NAME FAN_CITY FAN_DOB FAN_MODE
F001 SUSHANT MUMBAI 1998-10-02 MAIL
F001 RIYA MUMBAI 1997-12-12 LETTER
F003 ANIKA DELHI 2001-06-30 BLOG
F004 RUDRA AJMER 2005-08-22 MAIL
F006 MIARA KOLKATTA 1998-11-01 BLOG

Write MySQL queries for the following questions:

  • To display the details of FANS in descending order of their DOB.
  • To display the details of FANS who does not belong to AJMER.
  • To count the total number of FANS of each FAN_MODE.
    Or (Option for part (iii) only)
    To display the DOB of the youngest fan.

Answer:

  • SELECT * FROM FANS ORDER BY FAN_D0B DESC;
  • SELECT * FROM FANS WHERE FAN_CITY<> ‘ AJMER ’ ;
  • SELECT FAN_M0DE, C0UNT(*) FROM FANS GROUP BY FAN_M0DE;
    Or
    SELECT MAX(FAN_DOB) FROM FANS;