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

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 7 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 7 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 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 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.
Which of the following is not a type of Cyber crime? [1]
(a) Data theft
(b) Forgery of online documents
(c) Damage to data and systems
(d) Installing antivirus for protection
Answer:
(d) Installing antivirus for protection

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

Question 2.
A/An ………. is a unique data trace of a user’s activities, actions, communications or transactions in digital media. [1]
(a) digital handprint
(b) digital footprint
(c) offline footprint
(d) offline handprint
Answer:
(b) digital footprint

Question 3.
Pandas series is [1]
(a) two dimensional
(b) three dimensional
(c) one dimensional
(d) multi-dimensional
Answer:
(c) one dimensional

Question 4.
Following are the impact of e-Waste on the environment. [1]
Choose the odd one out.
(a) Soil pollution
(b) Water pollution
(c) Air pollution
(d) Sound pollution
Answer:
(d) Sound pollution

Question 5.
The AVG( ) function in MySQL is an example of [1]
(a) MATH( ) function
(b) TEXT( ) function
(c) DATE ( ) function
(d) Aggregate function
Answer:
(d) Aggregate function

Question 6.
Out of the following, which function cannot be used for customization of charts in Python? [1]
(a) xlabel( )
(b) color( )
(c) title ( )
(d) xticks( )
Answer:
(b) color( )

Question 7.
‘F’ in FOSS stands for [1]
(a) Free
(b) Forever
(c) Fire
(d) Freezing
Answer:
(a) Free

Question 8.
While accessing the column from the DataFrame, we can specify the column name. In case column does not exist, which type of error it will raise? [1]
(a) Key error
(b) Syntax error
(c) Name error
(d) Runtime error
Answer:
(a) Key error

Question 9.
Which of the following is a collection of independent computers and other hardware interconnected by communication channels? [1]
(a) Computer
(b) Networking
(c) Sharing
(d) None of these
Answer:
(b) Networking

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

Question 10.
Table: DEPARTMENT [1]

DEPT CODE DEPTNAME PLACE
D01 CSE MUMBAI
D02 IT KOLKATA
D04 MEDIA DELHI
D03 HR MUMBAI
D05 SALES DELHI

Write the output of the following statement.
SELECT COUNT(DISTINCT DEPTNAME) FROM DEPARTMENT;
(a) 5
(b) 4
(c) 3
(d) Error
Answer:
(a) 5

Question 11.
Modulation and demodulation is performed by
(a) microwave
(b) satellite
(c) modem
(d) gateway
Answer:
(c) modem

Question 12.
If on ‘1990-01-22’, it was Monday, what will be the output of following SQL command?
SELECT dayname (‘1990-01-22’)+1: [1]
(a) Error
(b) 1
(c) 7
(d) Monday
Answer:
(b) 1

Question 13.
Which of the following is not a violation of I PR? [1]
(a) Plagiarism
(b) Copyright infringement
(c) Patent
(d) Trademark infringement
Answer:
(c) Patent

Question 14.
In MySQL, Reena and Zebi are getting the following output of SELECT statement on a table Employee. [1]
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 1
Which keyword has Zebi used with a SELECT statement to get the above output?
(a) COUNT
(b) UNIQUE
(c) DISTINCT
(d) All of these
Answer:
(c) DISTINCT

Question 15.
Which aggregate function returns the count of all rows in a specified table? [1]
(a) SUM( )
(b) DISTINCT( )
(c) COUNT( )
(d) None of these
Answer:
(c) COUNT( )

Question 16.
In which function, NULL values are excluded from the result returned? [1]
(a) SUM( )
(b) MAX( )
(c) MIN( )
(d) All of these
Answer:
(d) All of these

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

Question 17.
Assertion (A) In Open source software source code is available and the user can make modifications as per their need. [1]
Reason(R) Sometimes you need to make payments for open source Software.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are ture 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) Open source softwares have the source code, which is available and it can be modified, but we need to pay some amount for open source software license.

Question 18.
Assertion (A) Elements of Series can be accessed using positional index. [1]
Reason (R) Positional index values ranges from 1 to n if n is the size of the series.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are ture 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) Elements of the series can be accessed using positional index , positional index values start from 0 and it ranges from 0 to n-1 if n is the size of the series.

Section – B

Question 19.
Navya has just created a website for her company and now need to host it. Briefly discuss the role of a web server in hosting a website. [2]
Or
Write one advantage each of star and bus topology used in networking. Draw a network layout of bus topology to connect six computers.
Answer:
A web server is the residence of web pages. It is also the agent that fetches the web pages when the web pages are requested by clients. The main job of a web server is to display website content through storing, processing and delivering web pages to users. All computers that host websites must have web server software. Web servers are used in web hosting or the hosting of data for websites and web-based applications or web applications.
Or
Advantage of star topology is that it is most reliable as there is a direct connection of every node with the central node or server.
Advantage of bus topology is that all nodes are connected through a single length of a cable, so very short cable length is used.
A network layout of bus topology to connect six computers is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 4

Question 20.
Mr. Roy is a manager in a hotel and wants to find out some data from a table where he maintains the hotel records. He is not very expert with SQL commands and functions. Help him to write the queries. [2]

Roomid CName RoomType DtofArrival Charges
R1 Ritesh AC 2016-09-09 1800
R2 Suman Deluxe 2020-08-01 2000
R3 Abhi General 1995-04-05 3000
R4 Ram AC 1994-02-02 2500
R5 Nitin Deluxe NULL 7000

(i) Display count of the different room types from the table Hotel.
(ii) Display the average room charges of ‘AC” rooms.
Answer:
(i) SELECT COUNT (DISTINCT RoomType) FROM Hotel;
(ii) SELECT AVG(Charges) FROM Hotel WHERE RoomType=“AC”;

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

Question 21.
Shyam was interrogated by his teacher in a viva about the differences between single-row functions and multiple-row functions. He could not answer the questions. Help shyam in figuring out four differences. [2]
Answer:
Differences between single-row and multiple-row functions are as follows

Single-row functions Multiple-row functions / Aggregate functions
It operates on a single row at a time. It operates on multiple rows.
It returns one result per row. It returns one result for multiple rows.
It can be used in SELECT, WHERE and ORDER BY clause. It can be used in the SELECT clause only.
Mathematical, String and Date functions are examples of single-row functions. MAX( ), MIN( ), AVG( ), SUM( ), COUNT( ) and COUNT (*) are examples of multiple-row functions.

Question 22.
Write a Python program to display the difference of elements of two series objects. [2]
Answer:
import pandas as pd
a=[12,13,14,15]
b=[2,3,4,5]
s1=pd.Series(a)
s2=pd.Series(b)
print(s1 – s2)

Question 23.
What is Data Protection? List two ways to protect your data. [2]
Or
How is Cyber bullying different from Cyber stalking?
Answer:
Data protection refers to the practices, safeguards and binding rules that ensure protection of sensitive and personal information.
Two ways of data protection are as follows:
(i) By data encryption
(ii) Not opening phishing E-mails
Or
Cyber bullying is the attack upon an individual or group through the use of electronic means such as instant messaging , social media, email etc. whereas Cyber stalking is a form of Cyber crime that takes place online when a criminal uses technology to harass or threaten a person or an organisation.

Question 24.
What will be the output of the given code? [2]
import pandas as pd
s = pd.Series([1,2,3,4,5], index=[‘akram’,‘brijesh’, ‘charu’, ‘deepika’, ‘era’])
print(s[‘charu’])
Answer:
The code print(s[‘charu’]) prints the value at
index ‘charu’ which is 3.

Question 25.
Consider the following DataFrame df: [2]

Name Age Marks
0 Amita 15 90.0
1 Bhavdeep 16 NaN
2 Reema 17 87.7

Write the Python command:
(i) To display the half of the marks obtained by all students.
(ii) To add new column to the DataFrame with name ‘Percentage with relevant values.
Answer:
(i) print(df .Marks/2)
(ii) df[ ‘Percentage’]=[89,40,80]

Section – C

Question 26.
Write a output for SQL queries (i) to (iii), which are based on the table Student given below: [3]
Table: Student

RollNo Name Class DOB Gender City Marks
1 Nanda X 06-06-1995 M Agra 551
2 Saurabh XII 07-05-1993 M Mumbai 462
3 Sonal XI 06-05-1994 F Delhi 400
4 Trisla XII 08-08-1995 F Mumbai 450
5 Sohan XII 08-10-1995 M Deihi 369
6 Marisla XI 12-12-1994 F Dubai 250
7 Neha X 08-12-1995 F Moscow 377
8 Nishant X 12-06-1995 M Moscow 489

(i) SELECT COUNT(*), City FROM Student GROUP BY City HAVING C0UNT(*)>1;
(ii) SELECT MAX(DOB),MIN(DOB) FROM Student;
(iii) SELECT NAME,GENDER FROM Student WHERE City= “Delhi”;
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 5

Question 27.
Rahul has written a code with a DataFrame and a CSV file ”Emp.csv’’ containing records of employees as follows: [3]

Index Eno Ename Eage Esal
0 1 Ritesh 15 5600
1 2 Aakash 16 17000
2 3 Sumit 17 12500
3 4 Ria 20 18000

Write the Python code to read the data from the CSV file, display its first two records and then rewrite the data to a new CSV file .
Answer:
import pandas as pd
empdf=pd . read_csv( ’ C : \\Data\\Emp. csv ’)
empdf-. head (2)
empdf.tocsv(‘C:\\Data\\Empnew.csv’)

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

Question 28.
Given a DataFrame ‘df’ created as : [3]

Index Roll Name Marks
0 1 Ravi 56
1 2 Sheeta 77
2 3 Paromita 89
3 4 Debarati 98

Write the Python statements to ;
(i) Get the output as ” 2 Paromita”.
(ii) Change the index order to 2,1,0.
(iii) See the data type of the ‘Marks’ column.
Answer:
(i) df.loc[2:, ‘Name’]
(ii) df. reindex( [2,1,0])
(iii) df [ ‘Marks ’ ] .dtype

Question 29.
List the guidelines to avoid plagiarism. [3]
Or
What are the psycholgical problems related to the usage of technology?
Answer:
Follow the below guidelines to avoid plagiarism:
(i) To avoid plagiarism, instead of copying the language of the book as it is, try to put it is your own language/words.

(ii) One should have a clear understanding of plagiarism and its consequences, so that no one perform it unintentionally.

(iii) If copying someone else’s work in our task, word for word, then do not forget enclosing it is quotes and also mention its source.

(iv) Another way is to credit the author has write which was useful for your task and not taking credit for its yourself.

Or
There are some psychological problems related to the usage of technology

(i) Egosurfing An illness of regularly reaching for one’s own name on the web and checking what information is available about one’s own on the net,

(ii) Infornography The word, derived from pornography and information, describes the state of “trying to quiet hunger for information on the net”.

(iii) Blog streaking A desire to spread information online that should not be known by everybody.

(iv) Youtube egoism constantly uploading one’s own videos in order to introduce and make himself or herself known to others.

(v) Google stalking trying to get information about all his or her relatives or acquaintances in the web.

(vi) Photo lurking Looking at the photoalbums of others’ on the net.

(vii) Wikipedia holism Contributing to the internet encyclopedia, wikipedia, sending someone’s own writings, and revising the present texts.

Question 30.
Consider the following table Games. Write SQL commands for the following statements. [3]
Table: Games

GCode GameName Type Number PrizeMoney ScheduleDate
101 Carom Board Indoor 2 5000 23/01/2004
102 Badminton Outdoor 2 12000 12/12/2003
103 Table Tennis Indoor 4 8000 14/02/2004
105 Chess Indoor 2 9000 01/01/2004
108 Lawn Tennis Outdoor 4 25000 19/03/2004

(i) To display the details of those Games, which are having PrizeMoney more than 7000 .
(ii) To display sum of PrizeMoney for each Type of Games.
(iii) To display the total number of games available in the above table Games.
Or
Naina works for M/s Anish Steels Ltd. She has written following statements, but is not able to understand the outputs. Explain her the working of these statements and produce the outputs.
(i) SELECT INSTR( ‘computerscience’, ‘sc’);
(ii) SELECT MID(‘funandfood’, 3,4 ) ;
(iii) SELECT ROUND(1334.99);
Answer:
(i) SELECT*FROM Games WHERE PrizeMoney >,7000; .
(ii) SELECT SUM(PrizeMoney), Type FROM Games GROUP BY Type;
(iii) SELECT COUNT(GameName) FROM Games;
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 6

Section – D

Question 31.
Given below a table Bookhouse, write SQL query for part (i) to (v). [5]
Table: Bookhouse

No Title Author Subject Publisher Qty Price
1 Data Structure Lips chute DS McGraw 4 217.00
2 DOS Guide Nortron OS PHI 3 175.00
3 Turbo C++ Robort Lafore Prog Galgotia 5 270.00
4 Dbase Dummies Palmer DBMS PustakM 7 130.00
5 Mastering Windows Cowart OS BPB 1 225.00
6 Computer Studies French FND Galgotia 2 75.00
7 COBOL Stern Prog John W 4 000.00
8 Guide Network Freed NET Zpress 3 200.00
9 Basic for Beginners Norton Prog BPB 3 40.00
10 Advanced Pascal Schildt Prog McGraw 4 350.00

(i) Display Publisher wise total stock value (Qty * Price),
(ii) Display Title of the book which is costliest,
(iii) Display number of books and total Price for each type of Publisher.
(iv) Display all the books where subject starts with “D” and Qty is less than 3.
(v) Display all information of books whose Price starts with 2.
Or
Write the uses of following MySQL functions with one example of each.
(i) MID
(ii) LEFT( )
(iii) TRIM( )
(iv) LCASE( )
(v) MAX( )
Answer:
(i) SELECT Publisher, Qty*Price AS Total_Stock_Value FROM Bookhouse GROUP BY Publisher;
(ii) SELECT Title FROM Bookhouse WHERE Price=MAX(Price);
(iii) SELECT COUNT)*), SUM(Price) FROM Bookhouse GROUP BY Publisher;
(iv) SELECT Title FROM Bookhouse WHERE Subject LIKE ‘D%’ AND Qty<3; ”
(v) SELECT * FROM Bookhouse WHERE Price LIKE ‘2%’ ;

Or
(i) MID( ) This function returns a substring of the specified length starting from the specified position, e.g. SELECT MID(‘HELLO’,3); Output

MID(‘HELLO’. 3 )
LLO

(ii) LEFT( ) This function returns the left most number of characters as specified.
e.g. SELECT LEFT( ‘HELLO’, 1);
Output:

LEFT(‘HELL0’, 1)
H

(iii) TRIM( ) It removes any extra spaces from right and left of a string but not from the middle.
e.g. SELECT TRIM(‘ Zebra crossing ’);
Output

TRIM (” Zebra crossing “)
Zebra crosssing

(iv) LCASE( ) This function converts the characters of an argument string to the lowercase characters,
e.g. SELECT LCASE (“Vowel”);
Output

LCASE
vowel

(v) MAX( ) This function returns the largest value from the selected columns.
Syntax SELECT MAX(column_name) FROM table_name;
e.g. Write a query to display the maximam pay availed by the coaches.
mysql> SELECT MAX (Pay) FROM Club;

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

Question 32.
China Middleton Fashion is planning to expand their network in India, starting with two cities to provide infrastructure for distribution of their products. The company has planned to setup their main office in Chennai at three different locations and have named their offices as Production Unit, Finance Unit and Media Unit. The company has its Corporate Unit in Delhi. [5]
A rough layout of the same is as fohows:
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 2
Approximate distance between these units is as follows:

From To Distance
Production Unit Finance Unit 70 m
Production Unit Media Unit 15 m
Production Unit Corporate Unit 2112 m
Finance Unit Media Unit 15 m

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

To Distance
Production Unit 150
Finance Unit 35
Media Unit 10
Corporate Unit 30

(i) Suggest the kind of network required (out of LAN, MAN, WAN) for each of the following units.
(a) Production Unit and Media Unit
(b) Production Unit and Finance Unit

(ii) Which of the following devices will you suggest for connecting all computers with each of their office units?
(a) Switch/Hub
(b) Modem
(c) Telephone

(iii) Suggest a cable/wiring layout for connecting the company’s local office units located in ’Chennai.

(iv) After setting up the lab and Internet in the lab, company now requires to enable videos and animations to be played on the web browser for it’s employees. Which browser tool /service can be used for the same?

(v) Give an example of Open Source web browser.
Answer:
(i) (a) The type of network between the Production Unit and Media Unit is LAN (Local Area Network).
(b) The type of network between Production Unit and Finance Unit is MAN (Metropolitan Area Network).
(ii) (a) The suitable device for connecting all the computers within each of their office units is switch/hub.
(iii) The cable/wiring layout for connection is as follows:
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 7
(iv) (b) Add-ons browser tool/service can be used to enable videos and animations to be played on the web browser for students of multimedia class.
(v) Google chrome, firefox.

Question 33.
Write a code to create the following DataFrame [5]

RNo Name Marks
SecA 21 Abhi 69.5
SecB 45 Anjali 84.5
SecC 23 Tushar 70.0
SecD 17 Mahi 78.0

Write the commands to do the following operations on the DataFrame given above:
(i) To add new section SecE with the values [08, ‘Kushal’, 80.0],
(ii) To modify the marks of SecC to 68.5.
Or
Observe the below figure and write the Python code to get the output.
CBSE Sample Papers for Class 12 Informatics Practices Set 7 Img 3
Answer:
import pandas as pd
data = (‘RNo’:[21,45,23,17],
‘ Name ’; [‘Abhi’,‘Anjali’,‘Tushar’,‘Mahi’],
‘Marks’:[69.5,84.5,70.0,78.0]}
df = pd.DataFrame(data,index=[‘SecA’, ‘SecB’,‘SecC ’, ‘SecD’ ])
print(df)
(i) df.locC’SecE’, :]=C08, ‘Kushal ‘ ,80.0]
print(df)
(ii) df .Marks [ ‘ SecC ’ ]=68.5
print(df)
Or
import numpy as np
import matplotlib.pypiot as pit
X=np.arange(5)
Y=[10,26,24,3,56]
plt.bar(X.Y)
plt.title(“First Bar Graph”)
plt.ylim(0,100)
plt.xlim(0,10)
plt:xlabel(‘x – axis ’)
pl t.ylabel(‘y – axis ’)
plt.xticks([0,2,4,6])
plt.yticks([0,20,40,60,80])
plt.show( )

Section – E

Question 34.
Jacqueline has created the following DataFrame consisting of data of houses of a school and the number of boys in the houses, shown as follows. She wants to perform certain operation on the data set. Help her with the correct actions. [1+1+2]
House

Index Housename Location Boys
0 Ganga East 20
1 Yamuna West 30
2 Saraswati North 56

(a) What will be the output of the following code?
(i) printCHouse.shape)
(ii) House .pop(“Location”) print(House)
(b) She wants the “Housename” column to be the index of the DataFrame. What statement she should write?
Or (Option for part (b) only)
She wants to see the number of columns. Write the statement which will display the number of columns
Answer:
(a) (i) (3,3)
(ii)

Index Housename Boys
0 Ganga 20
1 Yamuna 30
2 Saraswati 56

(b) House. set_index(‘Housename’)
Or
len(House.columns)

Question 35.
Consider the table given below and answer the questions [1+1+2]
Table: EMP

EMPNO ENAME SEX DOB DOJ DEPTCODE
101 Ram M 1990-05-02 2012-01-02 D01
102 Aman M 1992-03-01 2013-02-04 D03
103 Diya F 1989-01-04 2011-01-06 D04
106 Sandeep M 1993-04-06 2015-01-03 D02
105 Varun M 1995-07-08 2014-02-04 D05
107 Komal F 1994-03-02 2013-03-06 D01
104 Priyanka F 1995-02-01 2012-02-07 D01

(i) To display EMPNO, ENAME, SEX from the table EMP in descending order of EMPNO
(ii) To display the records of all female employee from the table EMP.
(iii) To display the EMPNO and ENAME of those employees from the table EMP who are joined between ‘2011-01-01’ and ‘2013-01-01’.
Or (Option for part (iii) Only)
To count the number of male employees who have born before ‘1994-01-01’
Answer:
(i) SELECT EMPNO, ENAME, SEX FROM EMP ORDER BY EMPNO DESC;
(ii) SELECT * FROM EMP WHERE SEX = ‘F’;
(iii) SELECT EMPNO, ENAME FROM EMP WHERE DOJ BETWEEN ‘2011-01-01’ AND ‘2013-01-01’;
Or
SELECT COUNT(EMPNO) FROM EMP WHERE SEX= ‘M’ AND DOJ < ‘1994-01-01’;