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

CBSE Sample Papers for Class 12 Informatics Practices Set 3 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 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

Multiple Choice Questions

Question 1.
What will be the output of the given code? import pandas as pd
s = pd.Series([1,2,3,4,5], index=[‘akram’/brijesh,/charu’/deepika’/era,])
print(s[‘charu’])
(A) 1
(B) 2
(C) 3
(D) 4 [1]
Answer:
(C) 3
Explanation: We will get the output as 3 because ‘charu’ is the index name given to 3rd row. s[‘charu’] will represent the element which is present in the third index that is 3.

Question 2.
A social science teacher wants to use a pandas series to teach about Indian historical monuments and its states. ‘ The series should have the monument names as values and state names as indexes which are stored in the given lists, as shown in the code.
Choose the statement which will create the series:
import pandas as pd
Monument=[‘Qutub Minar ‘/Gateway of India’, ‘Red Fort’,’Taj Mahal’]
State=[‘Delhi’,’Maharashtra’,’Delhi’,’Uttar Pradesh’]
(A) S=df.Series(Monument,index=State)
(B) S=pd.Series(State,Monument)
(C) S=pd.Series(Monument,index=State)
(D) S=pd.series(Monument,index=State) [1]
Answer:
(C) S=pd.Series(Monument,index=State)
Explanation: The Series() function creates a series. The index and values can be specified as lists. [1]

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

Question 3.
Out of the following, which function cannot be used for customization of charts in Python?
(A) xlabel( )
(B) colour( )
(C) title( )
(D) xticks( ) [1]
Answer:
(B) colour( )
Explanation: The xlabel( ) function in Pyplot module of matplotlib library is used to set the label for the x-axis. The title( ) method in matplotlib module is used to specify title of the visualization depicted and displays the title using various attributes. xticks (ticks) sets the x-axis tick values, which are the locations along the x-axis where the tick marks appear. colour ( ) method is not available in matplotlib library. [1]

Question 4.
What is the result of the following:
SELECT MOD (57,5);
(A) 1
(B) 2
(C) 3
(D) 4 [1]
Answer:
(B) 2
Explanation: SQL MOD() function is used to get the remainder from a division. [1]

Question 5.
ROUND( ) function rounds up the number to the upward or downward whichever the _______ whole number.
(A) Nearest
(B) Zero
(C) None
(D) None of these [1]
Answer:
(A) Nearest
Explanation: ROUND( ): Function is used to round up the number to the upwards or downwards whichever the nearest whole number. [1]

Question 6.
Write the output of the following SQL query:
SELECT POW (INSTR(‘Comment,/e/),2);
(A) 16
(B) 5
(C) 4
(D) 25 [1]
Answer:
(D) 25
Explanation: INSTR( ) is a string function in standard query language (SQL) which returns the starting position or location of a substring or pattern in the given input string. [1]

Question 7.
HTML is used to create:
(A) machine language program
(B) high level program
(C) web page
(D) web server [1]
Answer:
(C) web page
Explanation: HTML is the standard markup language for Web pages. With HTML you can create your own Website. [1]

Question 8.
Web site’s front page /main page is called:
(A) Browser Page
(B) Search Page
(C) Home Page
(D) Bookmark [1]
Answer:
(C) Home Page
Explanation: A “homepage” or “startup page” is the page your web browser opens when you first run the software, and the page it returns to when you click on the “Home” button in the browser’s toolbar. [1]

Question 9.
Knowledge and understanding of netiquette is useful because:
(A) it will help you create a positive impression on those you meet in cyberspace.
(B) it explains some of the technical limitations of online communications.
(C) it explains the conventions already being used by millions of cybernauts.
(D) all of the above. [1]
Answer:
(D) all of the above
Explanation: Netiquette is a combination of the words network and etiquette and is defined as a set of rules for acceptable online behavior. Similarly, online ethics focuses on the acceptable use of online resources in an online social environment. [1]

Question 10.
Include a subject line:
(A) only when you are writing an official memo.
(B) only in personal memos.
(C) if the person you are sending it to requires one.
(D) in all e-mail messages. [1]
Answer:
(D) in all e-mail messages
Explanation: Concise subject line that reflects the body of the e-mail. subject line should be include in all e-mail messages. [1]

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

Question 11.
The data taken from a digital footprint can be used for:
(A) Hacking
(B) Only for feedback
(C) Showing relevant ads
(D) All of these [1]
Answer:
(D) All of these
Explanation: Digital footprint means the impressions left on the browsers after using the internet. [1]

Question 12.
We should exhibit proper manners and etiquettes while being online. Choose the right net etiquette(s) from the following:
(A) Avoid Cyber Bullying
(B) Respect Other’s Privacy
(C) No Copyright violation
(D) All of the above [1]
Answer:
(D) All of the above
Explanation: Avoid cyber bullying, respect others privacy and No Copyright violation are all the example of etiquettes while being online [1]

Question 13.
Rishika found a crumpled paper under her desk. She picked it up and opened it. It contained some text which was struck off thrice. But she could still figure out easily that the struck off text was the emaillD and password of Garvit, her classmate. What is ethically correct for Rishika to do?
(A) Inform Garvit so.that he may change his password.
(B) Give the password of Garvit’s email ID to all other classmates.
(C) Use Garvit’s password to access his account.
(D) None of these [1]
Answer:
(A) Inform Garvit so.that he may change his password.
Explanation: Never write down your passwords on a sticky paper and hide underneath your workstation or telephone. Somebody will find it [1]

Question 14.
Find the output of:
SELECT RIGHT (‘Mrs Universe’, 2);
(A) se
(B) rs
(C) rs se
(D) Error [1]
Answer:
(A) se
Explanation: The RIGHT() function extracts a given number of characters from the right side of a specified character string [1]

Question 15.
Which of the following option is correct output for below statement?
SELECT LEFT (‘Mr Hello’, 4);
(A) Mr
(B) MrH
(C) MrHe
(D) None [1]
Answer:
(B) MrH
Explanation: LEFT( ): It is used to return a specified number of characters from the left of the string. The number of characters returned is determined by the second argument. [1]

Question 16.
If column “Present” contains the data set (15,18,17,15,18), what will be the output after the execution of the given query?
SELECT MAX (DISTINCT Present) FROM Data;
(A) 17
(B) 18
(C) 15
(D) Error [1]
Answer:
(B) 18
Explanation: DISTINCT statement is used to return only distinct (different) values. [1]

Assertion & Reason
Directions: In the following questions, a statement of assertion (A) is followed by a statement of reason (R). Mark the correct choice as:
(A) Both assertion (A) and reason (R) are true and reason (R) is the correct explanation of assertion (A).
(B) Both assertion (A) and reason (R) are true but reason (R) is NOT the correct explanation of assertion (A).
(C) Assertion (A) is true but reason (R) is false.
(D) Assertion (A) is false but reason (R) is true

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

Question 17.
Assertion (A): The repeater is a device that amplifies the network over geographical distance.
Reason (R): A hub is a device which is used to connect more than one device in the network. [1]
Answer:
(B) Both assertion (A) and reason (R) are true but reason (R) is NOT the correct explanation of assertion (A).
Explanation: Repeater has two ports: one for incoming signal and another one for “boosted” outgoing signal. Hub is able to join more than two signals. It takes the signal, “boosts” it, and transmits to all its ports. Typically hub can connect from 8 to 24 connections together. [1]

Question 18.
Assertion (A): To make a Histogram with Matplotlib, we can use the plt.hist( ) function.
Reason (R):The bin parameter is compulsory to create histogram.
Answer:
(C) Assertion (A) is true but reason (R) is false.
Explanation: hist( ) function from the matplotlib library is use to create a histogram but bin parameter not necessary to create a histogram. The purpose of bin is to distribute the histogram into different sectors. A histogram displays numerical data by grouping data into “bins” of equal width. Each bin is plotted as a bar whose height corresponds to how many data points are in that bin. Bins are also sometimes called “intervals”, “classes”, or “buckets”. So, option C is the correct option. [1]

Section – B

Question 19.
Draw a network layout of bus topology to connect 5 client computers and one server computer. [2]
OR
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
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 2
OR

S.No. INTERNET WWW
(i) Internet is a global network of networks. WWW stands for
(ii) Internet is a means of connecting a computer to any other computer anywhere in the world. World Wide Web.
(iii) Internet can be viewed as a big book-store. World Wide Web is a collection of information which is accessed via the Internet.

[2]

Commonly Made Error:
Sometimes Students think that Internet and WWW are same.

Answering Tip:
Appropriate analogy can be used to explain the difference.

Question 20.
Define the following terms
(i) POWER( )
(ii) ROUND( ) [2]
Answer:
(i) POWER( ): This function is used to get the power of the given values.
(ii) ROUND( ): This function is used to round up to number to the upwards or downwards to the nearest whole number. [2]

Question 21.
Can a GROUP BY clause be used for more than one column? Give example. [2]
Answer:
Yes, GROUP BY clause can be used for more than one column.
example,
SELECT Name, Sno, Grade, Class
FROM Student
GROUP BY Class, Grade; [2]

Question 22.
Write a program that reads from a CSV file where the separator character is ‘$’. Read only the first 5 rows in your dataframe. Give column headings as ItemName, Quantity, Price. Make sure to read the first row as data and not as column headers [2]
Answer:
import pandas as pd
df = pd.read_csv(“data.csv”, sep=”$”,
names = [“ItemName”,”Quantity”,”Price”],
header=None, nrows = 5)
print(df) [2]

Question 23.
What is the purpose of data protection?
OR
Define open source.
Answer:
Storage technology that can be used to protect data include a disk or data backup that copies designated information to a disk based storage array or a tape cartridge device so it can be safely stored. Mirroring can be used to create an exact replica of a website or files so they are available from more than one place. Storage impetus can automatically generate a set of pointers to information stored on tape or disk, enabling faster data recovery while continuous data protection backs up all the data in an enterprise whenever a change is made. [2]
OR
Open source refers to any program whose source code is made available for use or modification to users or other developers see fit. Open source software is usually developed as a public collaboration and made freely available. [3]

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

Question 24.
What do you mean by bar graph? [2]
Answer:
Categorical data can be represented in rectangular block with different heights or lengths proportional to the values. Such a type of representation is called a bar chart. The bar chart can be plotted vertically or horizontally. [2]

Commonly Made Error:
Some students get confused in bar graph and histogram.

Answering Tip:
Students should learn all graphs or plots properly.

Question 25.
Write a Python code to create dataframe with appropriate headings from the list given below :

ID Name Scores
0 C01 Rishi 170
1 CO2 Keshav 169
2 C03 Chetan 175
3 C04 Tushar 182
4 C05 Aadi 167

Answer:
import pandas as pd
data = [[‘C01’, ‘Rishi’, 170], [‘C02’, ‘Keshav’, 169], [‘C03’, ‘Chetan’, 175], [‘C04’, ‘Tushar’,182],[‘C05’, ‘Aadi’,167]]
df1=pd. DataFrame (data,columns = [‘ID’, ‘Name’, ‘Scores’])
print(df1) [2]

Section – C

Question 26.
Given ‘Employee’ table as follows :

Employee_Id Category Salary
101 Sabhyata Sharma Null
102 Divya Arora 8900
103 Faizal Zaidi Null

What values will the following statements return? [3]
(i) SELECT COUNT(*) FROM Employee;
(ii) SELECT COUNT(Salary) FROM Employee;
(iii) SELECT Name FROM Employee WHERE Employee lD = 102;
Answer:
(i) 3
(ii) 1
(iii) Divya Arora [3]

Question 27.
Consider two objects A and B. A is a list where as B is a Series. Both have values 25,60, 80. What will be the output of the following two statements considering that the above objects have been created already?
(a) print (A*2)
(b) print(B*2)
Justify your answer. [3]
Answer:
(a) will give the output as:
[25, 60, 80, 25, 60, 80]
(b) will give the output as

0 50
1 120
2 160

Justification: In the first statement, A represents a list so when a list is multiplied by a number, it is replicated that many number of times.
The second B represents a series. When a series is multiplied by a value, then each element of the series is multiplied by that number. [3]

Question 28.
What is boolean indexing ? Also write four ways to filter a data in boolean indexing. [3]
Answer:
It helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a boolean index to use the boolean indexing. In boolean indexing, we can filter a data in four ways:
(i) Accessing a DataFrame with a boolean index
(ii) Applying a boolean mask to a dataframe.
(iii) Masking data based on column value.
(iv) Masking data based on index value. [3]

Question 29.
Write the objectives of IPR. [3]
OR
What are the advantages of digital footprint?
Answer:
The Policy is a comprehensive document that lays down seven objectives which have been elaborated with actionable steps to be undertaken by the identified nodal ministry or department towards achieving objectives.
(i) IPR Awareness (Outreach and Promotion) : To create public awareness about the economic, social and cultural benefits of IRPs among all sections of society.

(ii) Generation of IPRs: To stimulate the generation of IPRs.

(iii) Legal and legislative framework: To have strong and effective IPR laws, which balance the interests of owner right with larger public interest.

(iv) Administration and Management: To
modernize and strengthen service oriented IPR administration.

(v) Commercialization of IPRs: Get value for IPRs through commercialization.

(vi) Enforcement and Adjudication: To strengthen the enforcement and adjudicatory mechanisms for combating IPR infringements.

(vii) Human Capital Development: To Strengthen and expand human resources, institutions and capacities for teaching, training, research and skill building in IPRs. [3]
OR
Although when we hear the name digital footprint a negative image comes in our mind because it keeps the record of each and every activity of us we do online. But digital footprint has so many advantages-

(i) Digital footprint makes our online experience friendly. Digital footprint decreases the complexity of the online world. Without digital footprint our net surfing may not be that easy as it is today.

(ii) Digital footprint helps Google Ad Sense to serve their best. Using our digital footprint Google Ad Sense provides us appropriate advertisement. If they haven’t used our digital footprint this may happen that we are searching for job information and they feeding our search with railway booking information.

(iii) Using digital footprint Google finds correct audience for the advertisement. It is beneficial for the company because to show the advertisement of the things which user do not need have no mean and is not beneficial for both company and user. [3]

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

Question 30.
Write the output of the following SQL queries :
(i) SELECT MID(‘Healthy Dief, 5,3);
(ii) SELECT RIGHT (CONCAT(‘PYTHON’/PROGRAM’),4);
(iii) SELECT LENGTH (‘PYTHON PROGRAM’);
OR
Consider the following SQL string: “Arguments”
Write commands to display:
(i) “ments”
(ii) “men”
(iii) Argu (3)
Answer:
(i) thy
(ii) GRAM
(iii) 14 [3]

OR
(i) SELECT MID (“Arguments”, 5);
(ii) SELECT SUBSTR(“Arguments” ,5,3);
(iii) SELECT LEFT (“Arguments”, 4);

Section – D

Question 31.
Which function converts all the characters in a string into lowercase? Explain with example.
OR
Consider a Table LOANS:

AccNo Cust_Name Amount Installments Int_Rate Start_Date Interest
1. R.K. Gupta 300000 36 12.00 19-07-2009 1200
2. S.P. Sharma 500000 48 10.00 22-03-2008 1800
3. K.P.jain 300000 36 Null 08-03-2009 1600
4. M.P. Yadav 800000 60 10.00 06-12-2008 2250
5. S.P. Sinha 200000 36 12.50 03-01-2010 4500
6. P. Sharma 700000 60 12.5 05-06-2008 3500
7. K.S. Dhall 500000 48 Null 05-03-2008 3800

Answer the following questions.
(i) Display the sum of all Loan Amounts whose Interest rate is greater than 10.
(ii) Display the Maximum Interest from Loans table.
(iii) Display the count of all loan holders whose name ends with ‘Sharma’.
(iv) Display the count of all loan holders whose Interest is Null.
(v) Display the Interest-wise details of Loan Account Holders. [5]
Answer:
LOWER function converts all the characters in a string into lowercase. If you want to convert all characters in a string into uppercase, you should use the UPPER function.
The following illustrates the syntax of the LOWER function.
LOWER(string);
The LOWER function returns a string with all characters in the lowercase format. It returns NULL if the input string is NULL.
Some database systems such as Oracle database and MySQL provide the LCASE function that is equivalent to the LOWER function.
LCASE(string);
SQL LOWER examples
The following statement uses the LOWER function to convert a string to lowercase: mysql>SELECT LOWER(‘SQL LOWER’);
Output
sql lower [5]
OR
(i) select sum(Loan_Amount) from LOANS where Int_Rate >10;
(ii) select max(Interest) from LOANS;
(iii) select count(*) from LOANS where Cust_ Name like ‘%Sharma’;
(iv) select count(*) from LOANS where Int_Rate is NULL;
(v) select * from LOANS group by Interest; [5]

Question 32.
A company in Mega Enterprises has 4 wings of buildings as shown in the diagram :
CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 1
Centre to centre distances between various Buildings:

W3 to W1 50 m
W1 to W2 60 m
W2 to W4 25 m
W4 to W3 170 m
W3 to W2 125 m
W1 to W4 90 m

Number of computers in each of the wing:

W1 150
W2 15
W3 15
W4 25

Computers in each wing are networked but wings are not networked. The company has now decided to connect the wings also.
(i) Suggest a most suitable cable layout for the above connections.
(ii) Suggest the most appropriate topology of the connection between the wings.
(iii) The company wants internet accessibility in all the wings. Suggest a suitable technology .
(iv) Suggest the placement of the following devices with justification if the company wants minimized network traffic:
(a) Repeater
(b) Hub/switch
(v) The company is planning to link its head office situated in New Delhi with the offices in hilly areas. Suggest a way to connect it economically. [5]
Answer:
(i) Most suitable layout according to distance is :
CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 3
(ii) Star topology
(iii) Broadband
(iv) Hub in every wing
(v) Radio waves [5]

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

Question 33.
Write code on row selection by label in Data Frames. [5]
OR
Write a Python program to plot two or more lines
Answer:
Selection by Label
Rows can be elected by passing row label to loc function. eg.
import pandas as pd
d = {‘one’ :pd.Series([1,2/3]/ index=[‘a’/b’/c’]),
‘two’:pd.Series([1,2/3/4]/ index=[‘a’,’b’,’c’,’d’])}
df = pd.DataFrame(d)
print(df.loc[‘b’])
Its output is as follows-
one 2.0
two 2.0
Name: b, dtype: float 64
The result is a series with labels as column names of the DataFrame. And, the Name of the series is the label with which it is retrieved. [5]
OR
import matplotlib.pyplot as plt
x1= [20, 40, 60]
y1 =[10, 30, 40]
plt.plot (x1, y1, label = “line 1”)
x2 = [10, 20, 30]
y2 = [30, 50, 10]
plt.plot(x2, y2, label = “line 2”)
plt.xlabel (‘x-axis’)
plt.ylabel (‘y-axis’)
plt.title (‘legends’)
plt.legend( )
plt.show( )

Commonly Made Error:
Some students do not use proper indentation in program.

Answering Tip:
Students should use proper indentation in program.

Section – E

Case based Subjective Questions

Question 34.
Consider the following table Activity. Write output for the commands (i) to (ii) and command for the statement
(iii) :

PID PARTICIPANT GRADE EVENT POINTS EVENTDATE HOUSE
101 Amit Dubey A Running 200 2018-12-19 Gandhi
102 Shivraj Singh B Hopping bag 300 2019-01-12 Bose
103 Raj Arora B Skipping 200 2018-12-19 Gandhi
104 Kapil Raj A Bean bag 250 2018-12-19 Bhagat
105 Deepshikha Sen A Obstacle 350 2018-03-31 Bose
106 Saloni Raj Egg \& Spoon 200 2018-12-20 Bose

(i) SELECT COUNT (DISTINCT POINTS) FROM ACTIVITY; [1]
(ii) SELECT SUM(POINTS) FROM ACTIVITY; [1]
(iii) To display names of Participants and points in descending order of points. [2]
OR (Option for part iii only)
To display House wise total points scored along with House name. (i.e. display the HOUSE and total points scored by each HOUSE.) [2]
Answer:
(i) 4 [1]
(ii) 1500 [1]
(iii) SELECT PARTICIPANT, POINTS FROM
Activity ORDER BY POINTS DESC; [2]
OR
SELECT HOUSE, SUM (POINTS) FROM Activity GROUP BY HOUSE;

Question 35.
A Shivalik restaurant has recorded the following data into their register for their income by Drinks and Food

Day Monday Tuesday Wednesday Thursday Friday
Drinks 450 560 400 605 580
Food 490 600 425 610 625

A software designer is trying to write a code to plot the graph. Help him to fill in the blanks of the code and get the desired output.
import matplotlib.pyplot as pp
day = [‘Monday’/Tuesday’/Wednesday’/Thursday’/Friday’]
dr = [450,560,400,605,580]
fd = [490,600,425,610,625]
pp.plot(day, dr,label=’Drinks’, _____ = ‘g’) =Line-1
pp.plot(day,fd,label =’Food’, _____ = ‘m’) =Line-2
pp. ___________ Line-3
pp.xlabel(“Days”)
pp. ______ (“Orders”) Line-4
pp. _______ Line-5
pp. _____ Line-6
(a) (i) Choose the correct function from the following option for the Line-4. [1]
(ii) Choose the right function/method from the following for the Line-6. [1]
(b) Identify the suitable code to be used in the blank space in line marked as Line-3 to write a title for the chart “The Weekly Restaurant Orders”. [2]
OR (Option for part iii only)
What is the name of the function to Display legends in line marked as Line-5? Also, define it.
Answer:
(i) (a) ylabel(“Orders”) [1]
(b) show ( ) [1]
(ii) pp.title(“The Weekly Restaurant Orders”) [2]
OR
legend( )
A legend is an area describing the elements of the graph. In the matplotlib library, there’s a function called legend( ) which is used to place a legend on the axes