Article

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

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

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

Question 2.
Kavita wanted to use an operating system to which she could make further development, ____ 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, ____ 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, [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

Question 9.
The WWW is made up of the set of interconnected _______ that are linked together over the Internet. [1](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, _______ 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(CNAMEI4)FROM Customers WHERE CITIES =‘MUMBAI’ OR BANGLORE’;
(d) mysql>SELECT LEFT(CNAMEP, 4)FROM Customers WHERE CITIES =‘MUMBAI OR CITIES = ‘BANGLORE;
Answer:
(d) mysql>SELECT LEFT(CNAME, 4) FROM Customers WHERE CITIES =‘MUMBAI’ OR CITIES = ‘ BANGLORE’;

Question 13.
_____________ is not a malware. [1](a) Computer virus
(b) Spam
(c) Worm
(d) Application Software
Answer:
(d) Application Software

Question 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)

Question 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

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

Question 17.
Assertion (A) MAN might cover few buildings in a city and might either be private or public. [1]Reason (R) MAN is a network which spans a physical area that is larger than WAN but smaller than LAN.
(a) Both A and R are true and R is the correct explanation for A.
(b) Both A and R are true and R is not the correct explanation for A.
(c) A is true but R is false.
(d) A is false and R is true.
Answer:
(c) MAN is a network which spans a physical area that is larger than LAN (Local Area Network) but smaller than WAN (Wide Area network).

Question 18.
Assertion (A) Histograms are used to describe distributions. [1]Reason (R) 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) Both A and R are true and R is the correct explanation of A.

Section – B

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

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:
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 pages, 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 as- HTML, JavaScript, CSS, etc. Dynamic web pages are written in languages such as- CGI, AJAX, ASP, ASP.NET, etc.

Or

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 trie 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;

Question 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, COUNT(*) FROM Emp GROUP BY Dept HAVING COUNT(*)>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.
The Python code written below has syntactical errors. Rewrite the correct code and underline the correction made.

Import pandas as pd
data = {‘Name : ['Riya', 'Preeti', 'Neeta], ‘Age’: [25, 30, 22]}
df = Pd.DataFrame(Data)
df.to_csv(output.csv)

Answer:

import pandas as pd
data = {'Name': ['Riya', 'Preeti', 'Neeta'], 'Age': [25, 30, 22]}
df = pd.DataFrame(data)
df.to_csv('output.csv', index=False)

Question 23.
What are the e-Waste hazards?
Answer:
e-Waste hazards on the environment are as follows

  1. Acidification of soil
  2. Air pollution
  3. Pollution of ground water
  4. Landfills with lead and heavy metals

e-Waste hazards on the human health are as follows.

  1. Lung cancer
  2. DNA damage
  3. Asthmatic bronchitis
  4. Chronic damage to the brain
  5. Damage to heart and liver

Question 24.
Consider the following DataFranic df1:

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.
Complete the given Python code: Given a DataFrame ‘df’, select rows where the ‘score’ column ‘ is greater than 80 and ‘age’ column is less than 30. [2]

import ____ as pd
df = pd.DataFrame!{’name': ['Riya', 'Preeti', 'Neeta'], 'age': [25, 30, 22], 'score': [85, 78, 92]})
selected_rows = df[(df['score'] > ___) & (df['age'] < ___)]
print(selected_rows)

Answer:

import pandas as pd
df = pd.DataFrame({'name': ['Riya', 'Preeti', 'Neeta'], 'age': [25. 30, 22], 'score': [85, 78, 92]}) 
selected_rows = df[(df['score'] > 80) & (df['age'] < 30)] 
print(selected_rows)

Section – C

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

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) Function RIGHT( )
Query SELECT RIGHT(user_id,2) FROM Hotel;

(ii) Function LCASE( )
Query SELECT LCASE(name) FROM Hotel;

(iii) Function SUBSTR( )
Query SELECT SUBSTR(city, 3, 3) FROM Hotel ;

Or

(i) To remove leading spaces – LTRIM()
e.g. SELECT LTRIM(“##Spaces##”);
Output

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

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

Note: denote space.

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’,‘Kavil’,‘Manu’, ‘ Ria’]
Phy=[70,60,76,89]
Chem=[30,70,50,65]
df=pd.DataFramet{“Name”:Name,“Phy”:Phy,“Chem”:Chem})

Question 28.

Naveen Rehana John Roja Mannat
Maths 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. [3](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.dropt(‘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?

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?
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

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.

Question 30.
Predict the output of the following queries. [3](i) SELECT INSTR(‘[email protected]’, ‘.’) ;
(ii) SELECT SUBSTR(‘[email protected]’ , 7, 4);
(iii) SELECT LEFT (‘[email protected]’, 5);
Answer:

Section – D

Question 31.
Table : Worker [4]

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 ’19-JAN-1984’ and ’18-JAN-1987’.
(iv) To add a new row with the following data:
19, ‘Daya kishore’, ‘Operator’, ‘P003’, 19-Jun-2008’, ‘11-Jul-1984’
Answer:
(i) SELECT * FROM Worker ORDER BY DOB DESC;
(ii) SELECT Name, Desig FROM Worker WHERE PI evel IN (“P001″, ” P002″);
(iii) SELECT * FROM Worker WHERE DOB BETWEEN “19-JAN-1984” AND “18-JAN-1987”;
(iv) INSERT INTO Worker VALUES (19, ‘Daya kishore’, ‘Operator’, ‘P003’, ‘ 11 – Jul -1984’ );

Question 32.
Consider the following DataFrame dfn: [4]

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 O, P, S and T, respectively.
(c) To transpose the DataFrame dfn.
Or (option for part (c) only)
To create another DataFrame S1 and add above DataFrame to it.
Answer:
(a) (i)

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

(ii)
A 330
B 550
C 610
(b) dfn.index=[‘0′, ‘P’, ‘S’, ’T’](c) dfn. T

Or

S1.append(dfn)

Section – E

Question 33.
Table: Furniture

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

Or

Explain the following SQL functions using suitable examples,
(i) RIGHT()
(ii) COUNT()
(iii) YEAR()
(iv) SUM()
(v) MOD()
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

(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 COUNTS (*) 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 34.
JNV School at Hyderabad have their offices according to the following diagram. Go through the details and answer the questions that follows. [5]JNV, Hyderabad

Distance between various wings are given below:

(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 smart phone/laptop users in the campus of JNV, Hyderabad.
Answer:
(i) SCHOOL, it contains maximum number of computers.

(ii) Star topology

(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, WAR 802.16

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

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.

Or

Write the code for the following bar graph.

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.DataFrame(data = array, index = index_values, columns = column_values)
print(df)

(i) df[‘Designation’](ii) df.rename (index== {1 : ‘E101’, 2 : ‘E102’, 3 : ‘E103’, 4 : ‘E104 ’ , 5 : ‘E105’ , 6 : ‘E106’, 7 : ‘E107 ’}, inplace = True)

Or

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 = plt.bar(ind, girls, width,
bottom=girls, yerr=girlStd, color=‘green’)
plt.ylabe1(‘Scores’)
plt.xlabe1(‘Groups’)
plt.title(‘Scores by groupin’ + ‘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( )


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