Article

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

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 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.
………. 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
WEEE (Waste Electrical and Electronic Equipment)

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 ____.
(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?
(a) AVG()
(b) ADD()
(c) MAX()
(d) COUNT()
Answer:
(b) ADD()

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

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

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

Question 9.
With the Internet help we can do ____. [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) Internet facility are able to 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}

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?
(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(C0UNT(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.
Identify the correct INSERT queries from the following : [1](a) INSERT INTO Persons(‘xxx1’, ‘yyy1’) ;
(b) INSERT INTO Persons(LastName, FirstName) Value (‘xxx’, ‘yyy’) ;
(c) INSERT INTO Persons Values(‘xxx1’ , ‘yyy1’) ;
(d) INSERT INTO Persons Value(‘xxx1’ , ‘yyy1’);
Answer:
(c) INSERT INTO Persons Values(‘xxx1’, ‘yyy1’);

Question 16.
What is the meaning of “GROUP BY” clause in MySQL?
(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

Directions (Q.Nos. 17-18) Assertion and Reason based Questions.

Question 17.
Assertion (A) A switch is more efficient than a hub in managing network traffic. [1]Reason (R) Unlike a hub, a switch can send data packets directly to the intended recipient based on the recipient’s MAC address.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true and R is the not correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(a) Both A and R are true and R is the correct explanation of A.

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;

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.
The Python code written below has syntactical errors. Rewrite the correct code and under line the corrections made. [2]

import pandas as Pd
data = [10, 20, 30, 40, 50]
myseries = pd.Series(data)
result = my_series + 5
print( )

Answer:

import pandas as pd
data = [10, 20, 30, 40, 50]
my_series = pd.Series(data)
result = my_series + 5
print(result)

Question 23.
What are the disadvantages of e-Waste recycling? [2]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:

  1. Copyright
  2. Patent
  3. Trademark

Question 24.
Complete the given Python code: Given the DataFrame ‘df’, drop the ‘salary’ column and display the first 5 rows of the modified DataFrame. [2]

import ____ as pd
df = pd.DataFrame({'name': ['Riya’. ‘Preeti', 'Neeta'], 'age'[25, 30, 22], 'salary':
[50000, 60000, 45000]})
df = df. ____(____, axis=1)
print(df.___(____))

Answer:

import pandas as pd
df = pa.DataFrame({'name': [‘Riya’, 'Preeti', 'Neeta'], 'age': [25, 30, 22], 'salary': [50000, 60000, 45000]})
df = df.drop('salary', axis=1)
print(df.head(5))

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 following table GARMENT, write SQL commands for the statements (i) to (iii). [3]Table: GARMENT

(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 READY DATE 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

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.Data Frame (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]

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

  1. Being lazy
  2. Lack of enforcement
  3. Fear of failure

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

(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:

Section – D

Question 31.
Consider the table FANS:
Table: FANS

Write MySQL queries for the following questions:
(i) To display the details of FANS in descending order of their DOB.
(ii) To display the details of FANS who does not belong to AJMER.
(iii) To count the total number of FANS of each FAN_MODE.
(iv) To display the DOB of the youngest fan.
Answer:
(i) SELECT * FROM FANS ORDER BY FAN_D0B DESC;
(ii) SELECT * FROM FANS WHERE FAN_CITY ! = ‘ AJMER ’ ;
(iii) SELECT FAN_MODE, COUNT (*) FROM FANS GROUP BY FAN_MODE ;
(iv) SELECT MAX( FAN_DOB) FROM FANS ;

Question 32.
Given a DataFrame Traindf:

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, loc[2, ”Fare”]%2)
(ii) del Traindf[‘Fare‘]print (Traindf)
(b) Write the command that displays output as 9.
(c) To delete the 3rd column.
Or (Option for part (c) 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
(c) del Traindf [‘Tname’]Or
Traindf.iloc[1:2]

Section – E

Question 33.
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

(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

Consider the following table CLUB.
Table: CLUB

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 ouput of the following query?
SELECT PAY *0.25 + 1000 FROM CLUB WHERE COACHNAME LIKE ‘R%’;
(v) Write a query to display 3 characters from left of coach name.
Answer:
(i) SELECT MAX(Charges) FROM Doctor WHERE Dept=”Ortho”;
(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

(i) mysql>SELECT SUBSTR (COACHNAME, 2, 4), AGE FROM CLUB;

(ii)

(iii) mysql>SELECT DAY (Date_of_Joining);

(iv)

(v) mysql>SELECT LEFT (‘COACHNAME’, 3);

Question 34.
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]

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:

(iv) Modem
(v) (c) Network device that sends the data over optimising paths through connected loop is router.

Question 35.
Write the code in Pandas to create the following DataFrame: [5]

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 Markl as Marks 1 in both the dataframes df1 and df2.
(v) To change index label of dfl from 0 to zero and 1 to one.

Or

Given a plot below, write the Python code to plot the graph.

Answer:

import numpy as np
import pandas as pd
df1 = pd.DataFrame({’Mark1':[30,40,15,40], 'Mark2':[20,45,30,70)})
df2 pd.DataFrame({'Mark1' :[10,20,20,50], 'Mark2' :[15,25,30,30]})

(i) print(df1)
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])
pltbar (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


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