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

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 8 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 8 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.
What kind of problems can occur as a health hazard of using technology? [1]
(a) Vision problems
(b) Muscle problems
(c) Obesity related problems
(d) All of these
Answer:
(d) All of these

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

Question 2.
Kavita wanted to use an operating system to which she could make further development, what kind of operating system software she should use? [1]
(a) Open source
(b) Proprietary
(c) FOSS
(d) Both (a) and (c)
Answer:
(d) Both (a) and (c)

Question 3.
A Series has by default [1]
(a) positive indexes
(b) both positive and negative
(c) only user defined indexes
(d) Series does not have index
ANswer:
(a) Positive indexes

Question 4.
Theft of personal digital information in order to commit crime is called [1]
(a) data theft
(b) identity theft
(c) mail theft
(d) personal theft
Answer:
(b) Identity theft

Question 5.
Which of the following function returns an integer that indicates the position of the first occurrence of the sub-string within the string? [1]
(a) INSTR( )
(b) RTRIM( )
(c) LENGTH( )
(d) TRIM( )
Answer:
(a) INSTR( )

Question 6.
Jack wanted to create a data structure that would store the Name, Stream and Marks of his classmates, which data structure he should use? [1]
(a) Stack
(b) Series
(c) DataFrame
(d) None of these
Answer:
(c) DataFrame

Question 7.
Which of the following is/are the benefit(s) of e-Waste management? [1]
(a) Saving the environment
(b) Creating jobs
(c) Recovery of precious metals
(d) All of these
Answer:
(d) All of these

Question 8.
Given below is a code, identify the error in it. [1]
import pandas as p
Toys=p.Series([22,44,66,88,99])
The property to get the number of bytes occupied by the series is
(a) T
(b) nbytes
(c) shape
(d) index
Answer:
(b) nbytes

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

Question 9.
The WWW is made up of the set of interconnected ……….. that are linked together over the Internet.
(a) electronic documents
(b) web pages
(c) files
(d) All of these
Answer:
(b) Web pages

Question 10.
What will be returned by the following query? [1]
SELECT ROUND( 178.867,2);
(a) 178.86
(b) 178.88
(c) 178.87
(d) 179.00
Answer:
(c) 178.87

Question 11.
In URL, http://www.arihant.com/index.htm, which component identifies the path of a web page? [1]
(a) http
(b) www.arihant.com
(c) /index.htm
(d) All of these
Answer:
(c) /index.htm

Question 12.
Choose the correct query to display the left most 4 letters from the customers who lives in Mumbai or Banglore. [1]
(a) mysql>SELECT LEFT(CNAME)FROM Customers WHERE CITIES =‘MUMBAI’
OR CITIES = ‘BANGLORE’ ;
(b) mysql>SELECT LEFT(CNAME,3)FROM Customers WHERE CITIES =‘MUMBAI*
OR CITIES = ‘BANGLORE’ ;
(c) mysql>SELECT LEFT(CNAME,4)FROM Customers WHERE CITIES =‘MUMBAI’
OR ‘BANGLORE’;
(d) mysql>SELECT LEFT(CNAME,4)FROM Customers WHERE CITIES =‘MUMBAI’
OR CITIES = ‘BANGLORE’ ;
Answer:
(d) mysql>SELECT LEFTICNAME,4)FROM Customers WHERE CITIES =‘MUMBAI’
OR CITIES = ‘BANGLORE’;

Question 13.
Which one of the following is not a malware? [1]
(a) Computer virus
(b) Spam
(c) Worm
(d) Application Software
Answer:
(d) Application Software

Questiion 14.
Which of the following function returns only the day number from month of selected date? [1]
(a) DAY(date)
(b) DAYNO(date)
(c) DAY_NUMBER(date)
(d) DATE (date)
Answer:
(a) DAY(date)

Question 15.
Which of the following function will display the specified number of characters from a particular position of the given string? [1]
(a) MID( )
(b) SUBSTR( )
(c) Both (a) and (b)
(d) None of these
Answer:
(c) Both (a) and (b)

Questiion 16.
The default date format is [1]
(a) MM-DD-YYYY
(b) YYYY-MM-DD
(c) DD-MM-YYYY
(d) None of these
Answer:
(b) YYYY-MM-DD

Question 17.
Assertion A We cannot freely comment on anything. [1]
Reason R Use of technology like Internet, E-mail, cellphones, social media to harass, threaten, embarrass, or target a person is a cyber crime
(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:
(a) We should not freely post any comments as there are cyber laws to deal with crimes like cyber bullying and cyber trolling.

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

Question 18.
Assertion A Histograms are used to describe distributions. [1]
Reason 6 To specify the intervals in x-axis, the property used is ”interval’’.
(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:
(a) Histogram do not show individual values but the distribution of values in intervals. The parameter to specify the intervals is “bins”.

Section – B

Questiion 19.
Aman, a freelance website developer, has been assigned a task to design few web pages for a book shop. Help Aman in deciding out of static web page and dynamic web page, what kind of web pages should be designed by clearly differentiating between static and dynamic web pages on atleast two points? [2]
Answer:
Aman should develop dynamic web pages as they are more rich with features, interactive and are better in performance.
Differences between static and dynamic web pages are as follows

Static Web Page Dynamic Web Page
In static web pages, pages will remain same until someone changes it manually. In dynamic web pagies, content of pages are different for different visitors.
In static web pages, information are change rarely. in dynamic web page, information are changed frequently.
Static web pages are written in languages such asHTML, JavaScript, CSS, etc. Dynamic web pages are written in languages such asCGI, AJAX, ASP, ASP.NET, etc.

Or
Priyanka, a beginner in IT field has just started learning web technologies. Help her in understanding the difference between website and web pages with the help of a suitable general example of each.
Answer:
Differences between website and web page are as follows

Website Web Page
Website is a collection of web pages displayed on the web with a client-like browser. It is part of website that includes information and content and is displayed on the browser to user or visitor.
It is a combination of web pages created using HTML and CSS. Information is usually written in HTML language.
It requires more time to develop the website as compared to web pages. It requires less time to develop a web page as compared to the website.
It includes content about several entities. It includes content or information about a single entity.
There is no such extension included in the URL of the website. URL of web page include extension.
It is quite hard and complex to create the structure of the website and its programming. It is quite easy and simple to develop web page after website structure is being created.

Question 20.
Riya has given the following command to obtain the highest salary [2]
SELECT MAX (EMP_SALARY) FROM Employee
WHERE GROUP BY DOJ;
But she is not getting the desired output.
Help her by writing the correct command.
Answer:
SELECT DOJ,MAX(EMP_SALARY) FROM Employee GROUP BY DOJ; .

Questiion 21.
Aryan, a database administrator, has grouped records of a table with the help of GROUP BY clause. [2]
He needs to further filter groups of records generated through GROUP BY clause.
Suggest suitable clause for it and properly, explain its usage with the help of an example.
Answer:
He needs to use the HAVING clause. Just as the WHERE clause filters individual records on a condition, the HAVING clause can be used to filter groups on basis of a condition.
e.g. SELECT Dept, C0UNT(*) FROM Emp GROUP BY Dept;
Groups the records on Emp table by Dept and displays count of employees in each department.
SELECT Dept, C0UNT(*) FROM Emp GROUP BY Dept HAVING C0UNT(*)>5;
Groups the records on Emp table by Dept and displays count of employees in each department, but only those departments are shown whose number of employees are >5.

Question 22.
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. Write the Python code to do so. [2]
Answer:
import pandas as pd
Monument=[‘Qutub Minar’,‘Gateway of India’,‘Red Fort’,‘Taj Mahal’]
State=[‘Del hi’,‘Maharashtra’,‘Delhi ’,‘Uttar Pradesh’]
S=pd.Series(Monument,index=State)
print(S)

Question 23.
Explain IPR in brief. [2]
Answer:
IPR are the rights given to persons over the creations of their minds. Common types of intellectual property rights include copyright, trademarks, patents, industries design rights, trade dress and in some jurisdictions trade secrets. Some of them are as follows
(i) Copyright
(ii) Patent
(iii) Trademark
Or
What are the e-Waste hazards?
Answer:
e-Waste hazards on the environment are as follows

  • Acidification of soil
  • Air pollution
  • Pollution of ground water
  • Landfills with lead and heavy metals

e-Waste hazards on the human health are as follows

  • Lung cancer
  • DNA damage
  • Asthmatic bronchitis
  • Chronic damage to the brain
  • Damage to heart and liver

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

Question 24.
Consider the following dataframe dfl: [2]

EName Sal Bonus
0 Kavita 50000 3000
1 Sudha 60000 4000
2 Garima 55000 5000

Write the output of the given command:
df1.loc[:0,‘Sal’]
Answer:
50000
The command df1.loc[: 0,’ Sal ‘] prints the value of ‘Sal’ column for row 0.

Question 25.
Consider the following Series in Python
data = pd.Series([5, 2, 3,7], index=[‘a’, ‘b’,‘c’,’d’])
Write the Python statements to:
(i) Display all odd values of the series.
(ii) Display the number of elements in the series.
Answer:
(i) print(data[data%2!=0])
(ii) data.size

Section – C

Question 26.
Predict the output of the following queries, [3]
(i) SELECT INSTR(‘exams@cbse.nic.in’,’.’):
(ii) SELECT SUBSTR( ‘exams@cbse.nic.in’ ,7,4);
(iii) SELECT LEFT(‘exams@cbse.nic.in’,5);
Answer:
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 1

Question 27.
Ritika is a new learner for the Python Pandas and she is aware of some concepts of Python but is unable to create the DataFrame. Help her by writing proper statements which will create the DataFrame for the following data. [3]
Name: [‘Manpreet’,’Kavil’,’Manu’,’Ria’]
Phy: [70,60,76,89]
Chem: [30,70,50,65]
Answer:
import pandas as pd
Name=[‘Manpreet’,‘Kavi1’,‘Manu’,‘Ri a’]
Phy=[70,60,76,89]
Chem=[30,70,50,65]
df=pd.Data Frame((“Name”:Name,“Phy”:Phy,“Chem”: Chem})

Question 28.
Output of the above code [3]

Naveen Rehana John Roja Mannat
Mains 90 92 89 81 94
Science 91 81 91 71 95
Hindi 97 96 88 67 99

Based on above DataFrame, write the Python statements for the following.
(i) To add a new column with name of student ‘Prem’ in above DataFrame.
(ii) To set all the values to zero in DataFrame.
(iii) To delete the row of Science marks.
Answer:
(i) DF[‘Prem’]=[89,78,76]
(ii) DF[:]=0
(iii) DF.drop( ‘Science’, axis=0)

Question 29.
Saharsh is a student of Class IXth and he is a very frequent user of Internet applications. One day he got an unpleasant message on his instant messenger. [3]
(i) What do you think he should do?
(ii) Exhibiting proper manners and etiquettes while being online is called as?
(iii) Name the law to handle such issues?
Answer:
(i) Go to his parents, teacher or other trusted adult and let them know that he feels uncomfortable or he can go to Cyber cell and complaint.
(ii) Netiquettes
(iii) Cyber law
Or
Mr. Navneet found that his login id and password are automatically appearing on keypress in the login page. Explain him how cookies are responsible for this and how they are useful? Arts. Cookies are files created by websites you visit. They make your online experience easier by saving browsing information. With cookies, sites can keep you signed in, remember your site preferences and give you locally relevant content. The purpose of the computer cookie is to help the website keep track of your visits and activity.

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

Question 30.
Ms.Saumya is working on a MySQL table named ‘Hotel’ having following structure: [3]
Table: Hotel

Field Type Null Key Default Extra
user_id varchar(20) YES NULL
name varchar(20) YES NULL
city varchar(20) YES NULL
mobile_no varchar(11) YES NULL

She needs to perform following task on the table.
(i) To fetch last 2 characters from the user_id column.
(ii) To display the values of name column in lower case.
(iii) To display 3 characters from 3rd place from the column city.
Suggest suitable SQL function for the same. Also, write the query to achieve the desired task.
Answer:
(i) Function RIGHT( )
Query SELECT RIGHT(userJd,2) FROM Hotel;
(ii) Function LCASE ( )
Query SELECT LCASE(name) FROM Hotel;
(iii) Function SUBSTR( )
Query SELECT SUBSTR(city,3,3) FROM Hotel ;
Or
While dealing with string data type in MySQL, its observed that sometimes unnecessary space character comes in between which hampers the successful executing of a string manipulation module. Name the suitable MySQL function(s) to remove leading, trailing and both type of space characters from a string. Also, give MySQL queries to depict the same.
Answer:
(i) To remove leading spaces – LTRIM( )
e.g. SELECT LTR1M(“##Spaces##”);
Output

LTRIM (“##Spaces##”)
Spaces##

(ii) To remove trailing spaces — RTRIM( )
e.g. SELECT RTRIM(“##Spaces##”);
Output

RTRIM (“##Spaces##”)
##Spaces

(iii) To remove spaces in both sides—TRIM( )
e.g. SELECT TRIH(“##Spaces##”);
Output

TRIM (“##Spaces##”)
Spaces

Section – D

Question 31.
Table: Furniture

No Itemname Type Dateofstock Price Discount
1 White lotus Double Bed 23/02/02 30000 25
2 Pink feather Baby Cot 20/01/02 7000 20
3 Dolphin Baby Cot 19/02/02 9500 20
4 Decent Office Table 01/01/02 25000 30
5 Comfort Zone Double Bed 12/01/02 25000 25

Based on above table, write the SQL commands for the following: [5]
(i) To show all information about the baby cots from the Furniture table.
(ii) To list the Itemname which are priced at more than 15000 from the Furniture table.
(iii) To list Itemname and Type of those items, in which Dateofstock is before 22/01/02 from the Furniture table in the descending order of Itemname.
(iv) To display Itemname and Dateofstock of those items, whose Type is “ Sofa” from Furniture table.
(v) To insert a new row in the Furniture table with the following data:
14, “Velvet touch” , “Double Bed”,{25/03/03}, 25000,30
Answer:
(i) SELECT * FROM Furniture WHERE Type= “Baby Cot”;
(ii) SELECT Itemname FROM Furniture WHERE Price>15000;
(iii) SELECT Itemname, Type FROM Furniture WHERE Dateofstock < “22/01/02” ORDER BY Itemname DESC;
(iv) SELECT Itemname , Dateofstock FROM Furniture WHERE Type= ‘Sofa’:
(v) INSERT INTO Furniture VALUES (14, ‘Velvet touch’, ‘Double Bed’, “25/03/03”, 25000, 30);
Or
Explain the following SQL functions using suitable examples.
(i) RIGHT( )
(ii) COUNT( )
(iii) YEAR( )
(iv) SUM( )
(v) MOD( )
Answer:
(i) RIGHT( ) This function returns a specified number of characters from the right of the string.
Syntax RIGHT (string, length);

(ii) COUNT( ) This function returns the total number of values or rows of the specified field or column.
COUNT (*) is a special function, as it returns the count of all rows in a specified table. It includes all the null and duplicate values.
Syntax SELECT COUNT(*) FROM table name;

(iii) YEAR( ) This function returns the YEAR part from the given date argument. The return value is in the range of 1000 to 9999 or 0 for null date.
Syntax YEAR(date/column_name);

(iv) SUM( ) This function returns the sum of values in the specified column. The SUM works on numeric fields only. Null values are excluded from the result returned.
Syntax SELECT SUM(column_name) FROM table_name;

(v) MOD( ) This function returns the remainder of a number dividing by another number.
Syntax MOD(Dividend, Divisor)

Question 32.
JNV School at Hyderabad have their offices according to the following diagram. Go through the details and answer the questions that follows. [3]
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 2
Distance between various wings are given below:

Wings Distance (in metre)
MESS to SCHOOL 60
MESS to DORMETORY 110
MESS to GATE 65
MESS to ADMIN 130
SCHOOL to DORMETORY 40
SCHOOL to GATE 50
SCHOOL to ADMIN 68
DORMETORY tO GATE 115
DORMETORY to ADMIN 100
GATE to ADMIN 65

(i) Name the most suitable wing, where the server should be installed. Justify your answer.
(ii) Draw the cable layout to efficiently connect various wings JNV Hyderabad and also write the topology.
(iii) Suggest a device/software and its placement that would provide data security for the entire network of the School.
(iv) (a) Which device will you suggest to be placed/installed in each of these wings to
efficiently connect all the computers within these wings.
(b) Suggest the placement of a repeater in the network with justification.
(v) Suggest a device and the protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of JNV Hyderabad.
Answer:
(i) SCHOOL, it contains maximum number of computers.
(ii) Star topology
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 3
(iii) Firewall should be installed in the SCHOOL, where the server is located.
(iv) (a) Hub/Switch
(b) Repeater should be installed, where the distance between the wings is 70 metre or more. As per the above layout, no repeater is required.
(v) Devices Wi-Fi or WiMAX or Wi-Fi router
Protocols 802.11, WAP, 802.16

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

Name Designation Salary
1 Abhi DBA 35000
2 Vanshika Pragrammer 40000
3 Riya Tester 32000
4 Chirag Content Writer 25000
5 Tushar Business Analyst 30000
6 Khushal Sales Executive 37000
7 Mahi Web Designer 42000

Write the commands to do the following operations on the DataFrame given above:
(i) To select the column Designation.
(ii) To change index label from 1 to E101, 2 to E102, …. and so on.
Answer:
import pandas as pd
import numpy as np
array = np.array([[‘Abhi‘DBA’,35000],
[‘ Vanshika ’,‘Programmer’,40000],
[‘Riya’,‘Tester’,32000],

[‘Chirag’,‘Content Writer’,25000],
[ ‘ Tushar’,‘Business Analyst’,30000],
[‘Khushal’, ‘ Sales Executive’,37000],
[‘Mahi’,‘Web Designer’,42000]])
index_values = [1,2,3,4,5,6,7]
column_values =[‘Name’,‘Designation’,‘Salary’]
df = pd.DataFrameCdata = array,
index = index_values,
columns = column_values)
print(df)
(i) df[‘Designation’]
(ii) df.rename (index={1 : ‘ El01 ’, 2 : ‘ E102 ’ , 3 : ‘ E103 ’ , 4 : ‘ E104 ’, 5 : ‘ E105 ’ , 6 : ‘ E106 ’ , 7 : ‘ E107 ’},
inplace = True)
Or
Write the code for the following bar graph.
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 4
Answer:
import numpy as np
import matplotlib.pyplot as plt
N = 5
boys = (22, 30, 35, 35, 26)
girls = (25, 32, 30, 35, 29)
boyStd = (4, 3, 4, 1, 5)
girlStd = (3, 5, 2, 3, 3)
ind = np.arange(N)
width = 0.35
p1 = plt.bar(ind, boys, width, yerr=boyStd, color=‘blue’)
p2 = pit.bar(ind, girls, width,
bottom=girls, yerr=girlStd, color=‘green’)
plt.ylabel( ‘ Scores’)
plt.xlabel(‘Groups’)
plt.title(‘Scores by group\n’ + ‘and gender’)
plt.xticks(ind, (‘G1’,‘G2’,‘G3’,‘G4’,‘G5’))
plt,yticks(np,arange(0, 81, 10)) ‘
plt.legend((p1[0], p2[0]),
(‘Boys’,‘Girls’))
plt.show( )

Section – E

Question 34.
Consider the following DataFrame dfn: [1 + 1 + 2]

A B C
Order 450 180 350
Purchase 330 550 610
Sell 250 410 380
Target 1050 980 1250

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

(b) Write the code to replace the existing indexes of a DataFrame with 0,PS and T, respectively.
Or (option for part (b) only)
To create another DataFrame SI and add above DataFrame to it.
Answer:

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

(ii)
A 330
B 550
C 610
Name : Purchase, dtype : int64

(b) dfn.index=[‘O’,‘P’,‘S’,’T’]
Or
S1. append(dfn)

Question 35.
Table : Worker [1 + 1 + 2]

Ecode Name Desig Plevel DOJ DOB
11 Radhey Shyam Supervisor P001 13-Sep-2004 23-Aug-1981
12 Chander Nath Operator P003 22-Feb-2010 12-Jul-1987
13 Fizza Operator P003 14-June-2009 14-Oct-1983
15 Ameen Ahmed Mechanic P002 21-Aug-2006 13-Mar-1984
18 Sanya Clerk P002 19-Dec-2005 09-June-1983

Consider the above table and write the SQL commands for the following:
(i) To display the details of all workers in descending order of DOB.
(ii) To display Name and Desig of those workers whose Plevel is either P001 or P002.
(iii) To display the detail of all the workers, whose DOB is in between T9-JAN-1984′ and T8-JAN-1987′.
Or (Option for part (iii) only)
To add a new row with the following data:
19, ‘Daya kishore’, ‘Operator’, ‘P003′,’19-Jun-2008′, Tl-Jul-1984’
Answer:
(i) SELECT * FROM Worker ORDER BY DOB DESC;
(ii) SELECT Name, Desig FROM Worker WHERE Plevel IN (“P001″, ” P 0 0 2″);
(iii) SELECT * FROM Worker WHERE DOB BETWEEN ” 19 – JAN -1984″ AND “18-JAN-1987”;
Or
INSERT INTO Worker VALUES (19, ‘Daya kishore’, ‘Operator’, ‘P003 ‘ , ‘ 19-Jun-20081, ’11 -Jul-1984’ );