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

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

CBSE Sample Papers for Class 12 Informatics Practices Set 8 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.
Write the output of the following SQL command, select substr(“COMPUTER”,3,4);
(A) MPUT
(B) PUTE
(C) PU
(D) MP [1]
Answer:
(A) MPUT
Explanation: The SUBSTR( ) function extracts some characters from a string.
Syntax
SUBSTR(string, start, length) [1]

Question 2.
Given a Pandas series called sequences, the command which will display the first 4 rows is _____.
(A) print (sequences.head(4))
(B) print (sequences.Head(4))
(C) print (sequences.heads(4))
(D) print (sequences.Heads(4)) [1]
Answer:
(A) print (sequences.head(4))
Explanation: A sequence is a group of items with a deterministic ordering. Pandas head( ) method is used to return top n (5 by default) rows of a data frame or series. [1]

Commonly Made Error:
Some students get confused between head( ) and tail( ) functions.

Answering Tip:
Students should learn all concepts individual ! i with their syntax and examples.

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

Question 3.
Identify the correct option to select first four rows and second to fourth columns from a DataFrame ‘Data’:
(A) display(Data.iloc[l: 4,2: 4])
(B) display(Data.iloc[l: 5,2: 5])
(C) print(Data.iloc[0: 4,1: 4])
(D) print(Data.iloc[l: 4,2: 4]) [1]
Answer:
(C) print(Data.iloc[0: 4,1: 4])
Explanation: The syntax for iloc is: dataframe. iloc[<start row index>:<end row index>,<start column index >: < end column index > ] Here start and end index for rows and columns act as slicing and the end index is excluded. So, for first 4 rows indexes will be 0:4 and second to fourth columns it will be 1:4. [1]

Question 4.
To change the width of bars in a bar chart, which of the following arguments with a float value is used?
(A) hwidth
(B) width
(C) breath
(D) barwidth [1]
Answer:
(B) width
Explanation: To specify common width for all bars width argument having a scalar float value in the bar( ) function as:
<matplotlib.pyplt>.bar(<x-sequence>, < ysequence >, width = < float value >) [1]

Question 5.
The avg( ) function in MySql is an example of …………
(A) Math function
(B) Text function
(C) Date function
(D) Aggregate function [1]
Answer:
(D) Aggregate function
Explanation: SQL aggregation is the task of collecting a set of values to return a single value. It is done with the help of aggregate functions, such as SUM, COUNT, and AVG. For example, in a database of products, you might want to calculate the average price of the whole inventory. [1]

Question 6.
Only ______ functions are used with GROUP BY clause.
(A) Text
(B) Math
(C) Date/time
(D) AGGREGATE [1]
Answer:
(D) AGGREGATE
Explanation: SQL aggregation is the task of collecting a set of values to return a single value. It is done with the help of aggregate functions, such as SUM, COUNT, and AVG. Aggregate functions are used only with GROUP BY clause. [1]

Question 7.
Which of the following is not a network device?
(A) Hub
(B) Switch
(C) Mesh
(D) Router [1]
Answer:
(C) Mesh
Explanation: In a mesh topology there is no central connection point. Instead, each node is connected to at least one other node and usually to more than one. Each node is capable of sending messages and receiving messages from other nodes. The nodes act as relays, passing on a message towards its final destination. [1]

Question 8.
The two basic parts of URLs are
(A) TCP and FTP
(B) The protocal and the domain name
(C) TCP/IP and ISP
(D) Destination and device
Answer:
(B) The protocal and the domain name
Explanation: URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet. A URL has two main components: Protocol identifier: For the URL http:// example.com, the protocol identifier is http. Domain name: For the URL http://example.com, the domain name is example.com. [1]

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

Question 9.
One limitation of antivirus programs is that they:
(A) Sometimes start behaving like virus
(B) Are very expensive
(C) Harm the computer
(D) Can detect only those viruses for which they are programmed [1]
Answer:
(D) Can detect only those viruses for which they are programmed
Explanation: An antivirus is software that protects against computer viruses, a type of malware that self- replicates by inserting its code into other software programs. [1]

Question 10.
With the outset of Covid-19 schools started online classes but due to continuous online classes students health issues also started. Health practitioner advised the parents to follow a few health tips. Which of the following health tips should not be suggested?
(A) The sitting posture should be correct.
(B) Breaks should be taken in between the online classes.
(C) To protect the eyes the gadgets be placed above eye level.
(D) Wash the eyes regularly [1]
Answer:
(C) To protect the eyes the gadgets be placed above eye level.
Explanation: Any screen or book should be placed at eye level for comfortable viewing and reading. [1]

Question 11.
Which of the following is not covered under IPR ?
(A) Music
(B) Insurance
(C) Logo designed
(D) Invention [1]
Answer:
(B) Insurance
Explanation: Intellectual property rights include patents, copyright, industrial design rights, trademarks, plant variety rights, trade dress, geographical indications, and in some jurisdictions trade secrets. [1]

Question 12.
Which of the following is a/an open-source software?
(A) Microsoft Windows
(B) Adobe Photoshop
(C) MySQL
(D) MS Powerpoint [1]
Answer:
(C) MySQL
Explanation: MySQL is an open-source relational database management system [1]

Question 13.
Priya is a student of class 10 and she is a very frequent user of internet applications. One day she got an unpleasant message on her instant messenger. What do you think she should do?
(A) Start chatting with an unknown person.
(B) Talk to her parents/teacher or other trusted adult and let them know that she is feeling uncomfortable.
(C) Ignore the conversation.
(D) She should delete the chat so that no one comes to know [1]
Answer:
(B) Talk to her parents/teacher or other trusted adult and let them know that she is feeling uncomfortable.
Explanation: We should never talk to unknown person over the internet. Ignoring any cyber bully will provoke him to do more such things, deleting the chat will be no solution as that person may again send similar messages. The best way is to tell her parents / teacher or some other trusted adults so that they can help her. [1]

Question 14.
Which of the following option is correct output for below statement?
SELECT LEFT (‘Wonders World’, 3);
(A) Won
(B) Wor
(C) Won Wor
(D) None [1]
Answer:
(A) Won
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 15.
If column “Grade” contains the data set (5,8,7,5,8), what will be the output after the execution of the given query?
SELECT SUM (DISTINCT Grade) FROM Exam;
(A) 7
(B) 8
(C) 5
(D) 20 [1]
Answer:
(D) 20
Explanation: DISTINCT statement is used to return only distinct (different) values. [1]

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

Question 16.
To sort a result set in ascending order, we can use _____ keyword with ORDER BY clause
(A) AASC
(B) ASC
(C) DESC
(D) ASCEND [1]
Answer:
(B) ASC
Explanation: ORDER BY clause is used to sort a result set returned by a SELECT statement. To sort a result set in ascending order, use ASC Keyword and in descending order, use DESC Keyword. The ORDER BY clause sorts the result set in ascending order by default. [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

Question 17.
Assertion (A): Iteration is a general term for taking each item of something one after another.
Reason (R): itertuplesQreturns the iterator yielding each index value along with a series containing the data in each row. [1]
Answer:
(C) Assertion (A) is true but reason (R) is false.
Explanation: Iteration is the repetition of a process in order to generate an outcome. The sequence will approach some end point or end value. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. iterrows( ) returns the iterator yielding each index value along with a series containing the data in each row. [1]

Question 18.
Assertion (A): A router is more powerful and intelligent than hub or switch.
Reason (R): It has advanced capabilities as it can analyze the data and decide the data is packed and send it to the other network. [1]
Answer:
(A) Both assertion (A) and reason (R) are true and reason (R) is the correct explanation of assertion (A).
Explanation: A router is more powerful and intelligent than hub or switch. It has advanced capabilities as it can analyze the data and decide the data is packed and send it to the other network. It can handle huge packets. It can be wired or wireless, both. A wireless router can provides access to many devices like smartphones, and connected devices. [1]

Section – B

Question 19.
Differentiate between internet and intranet. [2]
OR
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.
Answer:

Internet Intranet
(i) It is used to connect different net work of computer simultaneously. (i) It is the type of internet which is used privately.
(ii) There are multiple users and it provides unlimited number of information to the users. (ii) There are limited number of users and it provide limited number of information to its user.

[2]
OR
A web Serves is the main centralized computer system that hosts and runs websites it has a computer program that distributes web pages as they are requisitioned the basic role of the web serves is to store, process and delivery the web pages to the users as and when required

Question 20.
What is the use of the functions LCASE () and UCASE ()? [2]
Answer:
LCASE ( ) function converts the argument string to the lowercase and UCASE ( ) function converts the argument string to the uppercase. mysql>SELECT LCASE (‘COMPUTER Science ‘) ;
Output
computer science
mysql>SELECT UCASE(‘COMPUTER Science’);
Output

Question 21.
Consider the following SQL string: “Environment”
Write commands to display:
(a) “ronment”
(b) “ment” [2]
Answer:
(a) SELECT SUBSTR(//Environment”,5);
(b) SELECT MID (“Environment”, 8,4); [2]

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

Question 22.
What are the benefits of Pandas?
Answer:
(i) Data representation: It can easily represent data in a form naturally suited for data analysis via its DataFrame and series data structures in a concise manner.
(ii) Data sub setting and filtering: It provides for easy sub setting and filtering of data, procedures that are a staple of doing data analysis. [2]

Question 23.
What is Cyber Crime?
OR
How is cultural change induced by technology?
Answer:
Cyber crime refers to the use of a computer to commit a crime. As a criminal activity, it began when hackers started illegally accessing high-level computer networks. Some examples of cyber crime include credit card and identity theft, network intrusions and software piracy. [2]
OR
Culture defines the integrated behaviour of patterns of members living in a society. The term technology is the study of designing, development, implementation, management of computer systems. Technology and culture are interrelated with each other. As technology increases, it will create either a positive or a negative impact on the culture and society. Consequently, as cultures changes the demand for development of new technology increases.

Question 24.
Give the output of the code
import pandas as pd
a = pd.DataFrame ([1,1,1, None], index = [‘a’,’b’, ‘c’, ‘d’], columns = [‘one’])
print(a) [[2]
Answer:
Output one
Table

Question 25.
What is histogram?
Answer:
Histogram is a type of graph that is widely used in mathematics, especially in statistics. The histogram represents the frequency of occurrence of a specific phenomenon which lies within a specific range of values, which are arranged in consecutive and fixed intervals. [2]

Section – C

Question 26.
Table Emp is shown below. Write commands in SQL

ID Name Age Address Salary Phone
1 Siddarth 25 A-4, Ashok Vihar, Delhi 62000 9811076663
2 Chavi 23 B-21, Model Town, Mumbai 71000 9911342398
3 Karan 26 KC-24, North Avenue, Bhopal 65000 9810539357
4 Raunaq 22 A-152, Gomti Nagar, Lucknow 89000 9910139357
5 Kunal 27 B-5/45, Uday Park, Delhi 80000 9765345565

(i) To list names and respective salaries in descending order of SALARY.
(ii) To count the number of employees with names starting with ‘K’.
(iii) To display the name and address of employees whose age is greater than 25. [3]
Answer:
(i) SELECT NAME, SALARY FROM Emp ORDER BY SALARY DESC;
(ii) SELECT COUNTS) FROM Emp WHERE NAME LIKE “K%”;
(iii) SELECT NAME, ADDRESS FROM Emp WHERE AGE > 25; [3]

Commonly Made Error:
Some students do not use semicolon at the end of the query.

Answering Tip:
Use semicolon at the end of the query and write ! i query in proper manner.

Question 27.
Consider two objects x and y. x is a list whereas y is a Series. Both have values 10, 30, 70,120.
What will be the output of the following two statements considering that the above objects have been created already?
(a) print (x*3)
(b) print(y*3)
Justify your answer. [3]
Answer:
(a) will give the output as:
[10,30,70,120,10,30,70,120,10,30, 70,120]

(b) will give the output as

0 30
1 90
2 210
3 360

Justification: In the first statement x represents a list so when a list is multiplied by a number, it is replicated that many number of times.
The second y 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 will be the output of the following code?
fnom matplotlib import pyplot as pit
x=[4, 8, 3]
y=[l, 6, 9]
pit.plot(x, y)
pit.title (‘Details’)
pit.ylabel(‘Y axis’)
plt.xlabel (‘X axis’)
pit. show ( ) [3]
Answer:
Details
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 2

Question 29.
Explain Privacy Laws. [3]
OR
How open data is useful?
Answer:

The Constitution of India does not patently grant the fundamental right to privacy. India presently does not have any express legislation governing data protection or privacy. Privacy law refers to the laws that deal with the regulating, storing, and using of personally identifiable information of individuals, which can be collected by governments, public or private organizations, or other individuals.
The four most common types of invasion of privacy torts are as follows:

  • Appropriation of name or likeness
  • Intrusion upon seclusion
  • False Light
  • Public Disclosure of Private Facts [3]

Commonly Made Error:
Privacy law refers to the laws that deal with the regulating, storing, and using of personally identifiable information of individuals.

Answering Tip:
Privacy laws are based on fair information Practice.
OR
Open data is data that can be freely used, re-used and redistributed by anyone-subject only, at most, to the requirement to attribute and share alike.

(1) Availability and Access: The data must be available as a whole as and at no more than a reasonable reproduction cost, preferably by downloading over the internet. The data must also be available in a convenient and modifiable form.

(2) Re-use and Redistribution: The data must be provided under terms that permit re-use and redistribution including the intermixing with other data sets.

(3) Universal Participation: Everyone must be able to use, re-use and redistribute, there should be no discrimination against fields of endeavour or against a person or groups. For example, ‘non-commercial’ restrictions that would prevent ‘commercial’ use or restrictions of use for certain purpose (e.g., only in education,) are not allowed.

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

Question 30.
Write the output of the following SQL queries:
(i) SELECT MID (‘Board Examination’, 2,4);
(ii) SELECT INSTR (‘INFORMATION FROM’, ‘FOR’);
(iii) SELECT LENGTH (‘Board Examination’); [3]
OR
Considering the same string “Environment”
Write SQL commands to display:
(i) The position of the substring ‘ment’ in the given string.
(ii) The first 3 letters of the string.
(iii) The length of given string.
Answer:
(i) oard
(ii) 3
(iii) 17 [3]
OR
(i) SELECT INSTRfEnvironment”, “ment”);
(ii) SELECT LEFT(“Environment”,3);
(iii) SELECT LENGTH(“Environment”);

Section – D

Question 31.
What are SQL group functions?
OR
A Departmental store ‘Iconic’ is planning to automate its system so that they can store all the records on computer. They contacted a Software Company to make the software for the same. The company suggested that there is need of a front end and back-end software. The major challenge was to keep the record of all the items available in the store. To overcome the problem, the software company has shown the glimpses of the database and table required to resolve their problem:
Database Name: Iconic
Table Name: Garment
Attributes of the table: Geode – Numeric, Gname – Character 25, Size – Character 5, Colour – Character 10, Price – Numeric
Consider the following records in ‘Garment’ table and answer the given questions:

Table: GARMENT

GCODE GNAME SIZE COLOUR PRICE
111 Tshirt XL Red 1,400.00
112 Jeans L Blue 1,600.00
113 Skirt M Black 1,100.00
114 Jacket XL Blue 4,000.00
115 Trousers L Brown 1,500.00
116 Ladies Top L Pink 1,200.00

(i) Write the command that will give the output as

COLOUR
BLU
BLA
BLU

(ii) Write SQL statement to delete the record with GCode as 116.
(iii) Give the output of :
Select GName, Price from GARMENT order by Price Desc;
(iv) The correct command to change the colour of GARMENT with code as 116 to “Orange”.
(v) What is the degree and cardinality of ‘GARMENT’ table? [5]
Answer:

Group functions are also known as aggregate functions. These functions are as follows:

(i) COUNT ( ): This function returns the number of rows in the table that satisfies the condition specified in WHERE clause. If the where clause condition is not specified then the query returns the total number of rows in the table. For example: If you want the number of employees in a particular department, the query would be
SELECT COUNT (*) FROM Employee WHERE Dept = ‘Electronics’;
If you want the total number of employees in all departments, the query would take the form: SELECT COUNT (*) FROM Employee;

(ii) MAX ( ): This function is used to get the maximum value from a column.
To get the maximum salary drawn by an employee, the query would be SELECT MAX (Salary) FROM Employee;

(iii) MIN ( ): This function is used to get the minimum value from a column.
To get the minimum salary drawn by an employee, the query would be SELECT MIN (Salary) FROM Employee;

(iv) AVG ( ): This function is used to get the average value of a numeric column.
To get the average salary, the query would be SELECT AVG (salary) FROM Employee;

(v) Sum ( ): This function is used to get the sum of a numeric value in column.
To get the total salary given out to the employees
SELECT SUM (Salary) FROM Employee;
OR
(i) Select left(COLOUR,3) from GARMENT where COLOUR like “B%”;
(ii) Delete from GARMENT where GCode =116;
(iii)

GNAME PRICE
Jacket 4,000.00
Jeans 1,600.00
Trousers 1,500.00
Tshirt 1,400.00
Ladies Top 1,200.00
Skirt 1,100.00

(iv) Update GARMENT set COLOUR = “Orange” where Gcode=116;
(v) Degree=5 & Cardinality=6

Question 32.
Rovenza Communications International (RCI) is an online corporate training provider company for IT related courses. The company is setting up their new campus in Kolkata. You as a network expert have to study the physical locations of various blocks and the number of computers to be installed. In the planning phase, provide the best possible answers for the queries (i) to (v) raised by them.
Block to block distances (in meters)

From To Distance
Administrative Finance 60
Administrative Faculty Studio 120
Finance Faculty Studio 70

Expected Computers to be installed in each block

Buildings Computers
Administrative 20
Finance 40
Faculty studio 120

(i) Suggest the most appropriate block, where RCI should plan to install the server.
(ii) Suggest the most appropriate block to block cable layout to connect all three blocks for efficient communication.
(iii) Which type of network out of the following is formed by connecting the computers of these three blocks?
• LAN
• MAN
• WAN
(iv) Which wireless channel out of the following should be opted by RCI to connect to students from all over the world?
• Infrared
• Microwave
• Satellite
(v) RCI is planning to link its another block in the city located in the hilly region where cable connection is not feasible. Suggest an economic way to connect it with reasonably high speed. Justify your answer. [5]
Answer:
(i) Faculty Studio
(ii) CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 3
(iii) LAN (Local Area Network)
(iv) Satellite connection
(v) Radio Wave would be an economic way to
connect it with reasonably high speed. It offers mobility & freedom from land acquisition rights that are required for laying, repairing cables. [5]

Question 33.
Explain the data structure in Pandas. [5]
OR
Write the code to draw following graph:
CBSE Sample Papers for Class 12 Informatics Practices Set 8 Img 1
Answer:
Data structure is defined as the storage and management of the data for its efficient and easy access in the future where the data is collected, modified and the various types of operations are performed on the data respectively. Pandas provide two data structures for processing the data, which are described below:

(i) Series: It is a one dimensional object similar to an array, list or column in a table. It will assign a labelled index to each item in the series. By default, each item will receive an index label from 0 to N, where N is the length of the series minus one.

(ii) Data Frame: It is a tabular data structure comprised of rows and columns. Data frame is ‘defined as a standard way to store data and has two different indexes i.e., row index and column index. [5]
OR
import numpy as np
import matplotlib.pyplot as pit
objects = (‘Python’, ‘C++’, ‘Java’, ‘Perl’)

y_pos = np.arange(len(objects))
performance = [10,8,6,4]
plt.bar(y_pos, performance, align=’center’, alpha=0.5)
plt.xticks(y_pos, objects)
plt.ylabel(‘Usage’)
plt.title(Trogramming language’)
plt.show( )

Commonly Made Error:
Some students get confused in different types j of graph and they mistake in coding while ; generating graph.

Answering Tip:
Students should practice all graphs on > ; computers so that they could not make mistake in exam.

Section – E

Case based Subjective Questions

Question 34.
Consider the following table and answer the given questions.

Table Name: STUD

Admno S_Name Adm_Date Maks
501 Arup 2000-11-01 98
502 Raj 1999-10-02 65.8
503 Aman 2000-05-01 99
504 Saroj 1998-10-02 69.8

(i) What will be the output of the following query? [1]
SELECT MIN(Admno) FROM STUD;

(ii) What will be the output of the following query? [1]
SELECT COUNTS) FROM STUD;

(iii) What will be the output of the following query? Also, define the round( ) function. [2]
SELECT ROUND(SUM(marks)) FROM STUD;
OR (Option for part iii only)
What will be the output of the following query? Also, define the MAXQ function.
SELECT MAX(Adm_date) FROM STUD;
Answer:
501 [1]
4 [1]
Output
333
The ROUND( ) function in MySQL is used to round a number to a specified number of decimal places. If no specified number of decimal places is provided for round off, it rounds off the number to the nearest integer. [2]
OR
Output
2000-11-01
The MySQL MAX( ) function is used to return the maximum value in a set of values of an expression. This aggregate function is useful when we need to find the maximum number, selecting the most expensive product, or getting the largest payment to the customer from your table.

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

Question 35.
Consider the below code
import pandas as pd
list1 = [1,2,3,4,5,6,7,8]
list2= [‘swimming’,’tt’,’skating’,’kho kho’, ‘bb’, ‘chess’, ‘football’,”cricket”]
school=pd. Series(listl,mdex=list2)
school.name=(“little”)
print (school *2)
#statement 1
print (school.tail(3))
# statement 2
print (school[“tt”])
# statement 3
print (school[2:4])
# statement 4
(a) (i) Choose the correct name of the series object given above [1]
(ii) Choose the correct output for the statement: [1]
print (school[“tt”]) # statement 3
(b) The correct output of the statement: [2]
print (school*2) # statement 1

OR (Option for part iii only)

Identify the correct output for:
print (school[2:4]) # statement 4
Answer:
(a) (i) little
(ii) 2 [1]
(b)

swimming 2
tt 4
skating 6
kho kho 8
bb 10
chess 12
football 14
cricket 16

OR

skating 3
kho kho 4