Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 6 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 6 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.
Computer Network is _______
(i) Collection of hardware components and computers
(ii) Interconnected by communication channels
(iii) Sharing of resources and information
(iv) All of the above
Answer:
(iv) All of the above
Explanation: A computer network is a set of computers sharing resources located on or provided by network nodes. Th computers use common communication protocols over digital interconnections to communicate with each other.
Question 2.
Knowledge and understanding of netiquette is useful because _______
(i) it will help you create a positive impression on those you meet in cyberspace.
(ii) it explains some of the technical limitations of online communications.
(iii) it explains the conventions already being used by millions of cybernauts.
(iv) all of the above.
Answer:
(iv) all of the above.
Explanation: Netiquette is a combination of the words network and etiquette and is defied as a set of rules for acceptable online behaviour. Similarly, online ethics focuses on the acceptable use of online resources in an online social environment.
Question 3.
Which of the following is not a type of cybercrime?
(i) Data theft
(ii) Forgery
(iii) Damage to data
(iv) Installing antivirus for protection
Answer:
(iv) Installing antivirus for protection
Explanation: Th computer may have been used in the commission of a crime, or it may be the target. Cybercrime may harm someone’s security and fiancial health.
Question 4.
Predict the output of the following query:
select round(458.45, -1);
(i) 450
(ii) 460
(iii) 458
(iv) 500
Answer:
(ii) 460
Explanation: ROUND( ): Function is used to round up the number to the upwards or downwards whichever the nearest whole number.
Question 5.
The avg () function in MySql is an example of _______
(i) Math function
(ii) Text function
(iii) Date function
(iv) Aggregate function
Answer:
(iv) 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.
Question 6.
_______ is the practice of taking someone else’s work or ideas and passing them off as one’s own:
(i) Plagiarism
(ii) Copyright
(iii) Patent
(iv) All of the above
Answer:
(i) Plagiarism
Explanation: Plagiarism is the practice of taking someone else’s work or ideas and passing them of as one’s own.
Question 7.
Which object do you get after reading a CSV file using pandas. read_csv ( ) ?
(i) Dataframe
(ii) Nd array
(iii) Char Vector
(iv) None
Answer:
(iv) None
Explanation: Pandas read_csv( ) method is used to read CSV fie into DataFrame object. Th CSV fie is like a two dimensional table where the values are separated using a delimiter.
Question 8.
Anubhav, sales officer of a book agency wrote a query to display the book types along with their average prices for all the price entries that are greater than ?100 and have a group average value greater than ?150. She is experiencing problem getting the desired result from the following query.
SELECT Type, ‘Average Price’ = AVG(Price) From Titles WHERE Price >100 HAVING AVG(Price)>150;
Which of the following is a correct query to perform the given task?
(i) SELECT Type, ‘Average Price’ = AVG(Price) From Titles WHERE Price >100 AND AVG(Price)>150 Group BY Type
(ii) SELECT Type, ‘Average Price’ = AVG(Price) From Titles WHERE Price >100 Group BY Type HAVING AVG(Price)>150
(iii) SELECT Type, ‘Average Price’ = AVG(Price) From Titles Group BY Type HAVING AVG(Price)>150 AND Price >100
(iv) SELECT Type, ‘Average Price’ = AVG(Price) WHERE Price >100 Group BY Type HAVING AVG(Price)>150
Answer:
(ii) SELECT Type, ‘Average Price’ = AVG(Price) From Titles WHERE Price >100 Group BY Type HAVING AVG(Price)>150
Explanation: ‘Average Price’ gives alias name to the column that displays average price, the results of the query are summarized according to the type using Group BY Type. Average Price is calculated for only those books that have Price greater than using WHERE Price >100 and HAVING AVG(Price)>150 clause filters out all those records that have average price less than ₹150.
Question 9.
Predict the output of the following query: What is returned by INSTR (‘ JAVAT POINT’ , ‘P’)
(i) 6
(ii) 7
(iii) POINT
(iv) JAVAT
Answer:
(ii) 7
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.
Question 10.
Given a Pandas series called sequences, the command which will display the first 4 rows is
(i) print (sequences.head(4))
(ii) print
(iii) print (sequences .heads (4 ))
(iv) print
Answer:
(i) 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.
Question 11.
Which of the following is not a built in aggregate function in SQL?
(i) avg
(ii) max
(iii) total
(iv) count
Answer:
(iii) total
Explanation: SQL does not include total as a built in aggregate function. Th avg is used to fid average, max is used to find the maximum and the count is used to count the number of values.
Question 12.
In Python programming will be the output of the given expression:-
print(print(“Python”),”Programming”)
(i) Python Programming
(ii) Syntax Error
(iii) Python Programming
(iv) Python None Programming
Answer:
(iv) Python None Programming
Explanation: Th inner print function will display “Python” and in the next line “None” this value will be concatenated with “Programming”. So the overall output will be “Python None Programming”.
Question 13.
Which of the following action can be taken to keep the digital footprint clean?
(i) Search what information you leftover social media and the internet
(ii) Be smart and sensible while using any website, sending an email or opening a link
(iii) Control visibility settings from the browser or website/app settings
(iv) Remove any private details like mobile number, school, college name, address, photos, etc.
Answer:
(iv) Remove any private details like mobile number, school, college name, address, photos, etc.
Explanation: Th user’s should restrain from over sharing digital footprint and be more vigilant in its usage as there are possibility of risk of cyber bullying, identity theft humiliation and embarrassment beside violation of privacy.
Question 14.
A combination of two or more attributes that is used as a primary key are called.
(i) Alternate keys
(ii) Candidate keys
(iii) Composite keys
(iv) None of these.
Answer:
(iii) Composite keys
Explanation: In certain tables, a single key cannot be used to identify rows uniquely and a combination of two or more attributes is used as a primary key. Such keys are called Composite keys.
Question 15.
Bluetooth is an example of _______
(i) Personal Area Network
(ii) Local Area Network
(iii) Virtual Private Network
(iv) Wide Area Network
Answer:
(i) Personal Area Network
Explanation: Bluetooth is a personal area network (PAN) standard that is lower power than 802.11.
It was originally specifid to serve applications such as data transfer from personal computers to peripheral devices such as cell phones or personal digital assistants.
Question 16.
Polluters pay Principle means
(i) anyone causing the pollution will pay for the damage caused
(ii) polluters paid well by NGOs
(iii) polluters may get a bonus
(iv) polluters are not the cause of pollution
Answer:
(i) anyone causing the pollution will pay for the damage caused
Explanation: Th ‘polluter pays’ principle is The commonly accepted practice that those who produce pollution should bear the costs of managing it to prevent damage to human health or the environment.
Question 17.
Assertion (A): The Internet is world wide system of computer networks i.e., network of networks.
Reason(R): All computer on the Internet, communicate with one another using POP/IMAP which is a basic protocol of the Internet.
(i) Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion for (A).
(ii) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct explanation of Assertion for (A).
(iii) Assertion (A) is true, but Reason (R) is false.
(iv) Assertion (A) is false, but Reason (R) is true.
Answer:
(iii) Assertion (A) is true, but Reason (R) is false.
Explanation: Th Internet is a vast network that connects computers all over the world. Though the Internet, people can share information and communicate from anywhere with an Internet connection.
All computer on the Internet, communicate with one another using TCP/IP, which is a basic protocol of the Internet.
Question 18.
Assertion (A): List of dictionary can be passed to form a DataFrame.
Reason (R): Keys of dictionary are taken as row names by default.
(i) Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion for (A).
(ii) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct explanation of Assertion for (A).
(iii) Assertion (A) is true, but Reason (R) is false.
(iv) Assertion (A) is false, but Reason (R) is true.
Answer:
(iii) Assertion (A) is true, but Reason (R) is false.
Explanation: List of dictionary can be passed to form a DataFrame. Keys of dictionary are taken as column names by default.
Section B
Question 19.
Explain VoIP.
OR
Identify the following devices:
An intelligent device that connects several nodes to form a network and redirects the received information only to intended node(s).
Answer:
Voice over Internet Protocol or VoIP, allows us to have voice call (telephone service) over the Internet, i.e., the voice transmission over a computer network rather than through the regular telephone network.
OR
Switch
Question 20.
The python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
Import pandas as pd df ={"DATA SC":["Programming","Robotics","3D Printing"],"MEDICAL":["Biology", "Bio-Tech","NA"]} df= Pd.dataframe(df) Print(df)
Answer:
import pandas as pd df ={“DATA SC”:[“Programming”,”Robotics”,”3D Printing”], ”MEDICAL”:[“Biology”,”Bio-Tech”,”NA”]} df= pd.DataFrame(df) print(df)
Question 21.
consider the given Date: 06/23/2023
Write-suitable SQL queries for the following:
(i) Returns the dayname of the given date.
(ii) Returns the monthname of the given date in lowercase.
Answer:
(i) SELECT DAYNAME(‘06/23/2023’);
(ii) SELECT LOWER(MONTHNAME(‘06/23/2023’));
Question 22.
Predict the output of the given Python code:
import pandas as pd listl=[1,2,3] ser = pd.Series(listl+[listl]*2) print(ser)
Answer:
Output
Question 23.
What is the purpose of data protection?
Answer:
As the amount of data created and stored continues grow at unprecedented rates importance of data protection is also increasing. data protection is important for restoring it quickly after any corruption or loss. it also involves ensuring data privacy.
Question 24.
Complete the given Python code to get the required output of whole Dataframe.
import _____ as pd t= {"slno": [101,102,103], "Name": ["Anshi", "Kollol", "Subir"], "Age": [36, 42, 29], "Salary": [77.5, 70.4, 60.9], "Dept": ["Acct", "Author", "Mgr"]} df = ____.DataFrame (____, index= [ 'A' , ' B' ,' C' ] ) print (____)
Answer:
import pandas as pd t= {“slno”: [101,102,103], “Name”: [“Anshi”, “Kollol”, “Subir”], “Age”: [36,2,9], “Salary”: [77.5, 70.4, 60.9], “Dept”: [“Acct”, “Author”, “Mgr”]} df = pd.DataFrame (t,index=[‘A’,’B’,’C’]) print (df)
Question 25.
How is HAVING clause similar to WHERE clause?
How is HAVING clause different from WHERE clause?
Answer:
Similarity: HAVING and WHERE both can be said to be as decision structures which are used in SQL to take an action to the database or more specifially on any table of database by matching a some sort of string or valued based on the values already present in the database.
Difference: A WHERE clause is used to fiter records from a result. The fiter occurs before any groupings are made. A HAVING clause is used to fiter values from a group.
Section C
Question 26.
Based on the SQL table Vehicles, write suitable queries for the following:
1. A relation Vehicles is given below:
Write SQL commands to:
(i) Display the average price of each type of vehicle having quantity more than 20.
(ii) Count the type of vehicles manufactured by each company.
(iii) Display the total price of all the types of vehicles.
Answer:
(i) SELECT Type, AVG (Price) FROM Vehicles GROUP BY Type HAVING Qty>20;
(ii) SELECT Company, COUNT (DISTINCT Type) FROM Vehicles GROUP BY company;
(iii) SELECT Type, SUM (Price * Qty) FROM Vehicles GROUP BY Type;
OR
Write the output of the following queries.
(i) Select MIN(Price) AS “MIN PRICE” from Vehicles where QTY= “15”;
(ii) Select Count (*) from Vehicles where Company NOT like “M%”;
(iii) Select MAX(Price) from Vehicles;
Answer:
(i) MIN PRICE
350000
(ii) 1
(iii)500000
Question 27.
Create a DataFrame in Python from the given list:
[[‘ANSHUMAN’,’CALM’,8.5],[‘SITIJ’,’JOLLY’,9.8],[‘Payal’,’ADAMENT’,5.3],
[‘Deepak’,’BOLD’,4.7]]
Also give appropriate column headings as shown below:
Answer:
import pandas as pd df=[[“ANSHUMAN”,”CALM”,8.5],[“SITIJ”,”JOLLY”,9.8],[“Payal”,”ADAMENT”,5.3], [“Deepak”,”BOLD”,4.7]] df=pd.DataFrame(df,columns=[“Name”,”NATURE”,“RATING”]) print(df)
Question 28.
Write MySQL statements for the following:
(i) To create a database named BAG.
(ii) To create a table named BOOK based on the following specification:
Column Name | Data Type | Constraints |
BOOK_NO | Integer | Primary Key |
BNAME | Varchar(20) |
Answer:
(i) CREATE DATABASE BAG;
(ii) CREATE TABLE BOOK (BOOK_NUMBER INTEGER PRIMARY KEY, BNAME VARCHAR(20));
Question 29.
Neerja is a student of Class XI. She has opted for Computer Science. Neerja prepared the project assigned to her. ‘ She mailed it to her teacher. The snapshot of that email is shown below.
Find out which of the following email etiquettes are missing in it. Justify your answer.
(i) Subject of the mail
(ii) Formal greeting .
(iii) Self-explanatory terms
Answer:
Following email etiquettes are missing in the given screenshot
(i) Subject of the mail: This is basically the title of the email. A good email subject convinces readers to open your email.
(ii) Formal Greeting: Formal Greetings is missing in above screenshot as there is no words like:
Hi Hello Dear Respected etc
(iii) Self explanatory terms are missing in email screenshot as by reading mail we do not come to know the content of email.
OR
Explain the different types of Software License.
Answer:
Types of Software License:
(i) Proprietary license is a license where the copyright stays with the producers and the user is granted the right to use the software.
(ii) GNU General Public License (GPL) which are agreements under which open source are usually licensed.
(iii) End User License Agreement (EULA) indicates the terms under which the end user may use the software.
(iv) Creative commons (CC) license is a public copyright license that enables free distribution of a copyrighted work.
Question 30.
Consider the DataFrame below and answer the questions that follow:
(a) Which command will produce the following output to extract only a part of dataframe?
Piyush 60
Prem 40
Prakash 70
(b) What is the correct syntax to display the record of Piyush?
(i) df_data [df_data [ ‘Name’ ] = ‘ Piyush’ ]
(ii) df_data [df_data [ ‘Name’ ]==’Piyush’ ]
(iii) df_data[df_data.Name==’Piyush’]
(iv) df_data [ ‘Name’ ] ==’ Piyush’
(c) What is the output of the following command?
>>> df data.max( )
Answer:
(a) df.iloc[1:4,:2]
(b) (ii) and (iii)
(c)
Name Prem
Weight 70
Height 165
Section D
Question 31.
Ramesh manages database in a company. For business purposes, He created a table named BASIC. Assist him by writing the following queries:
Write SQL queries to:
(i) Display name and PID of people residing in cities with pincode starting with 14.
(ii) Display PID, Pincode, City of unique records.
(iii) Update the basic salary of people residing in Delhi by 10%.
(iv) display name and basic salary of people whose name end with ‘a’.
Answer:
(i) SELECT name, PID from basic where pincode like ‘14%’;
(ii) SELECT Pid, pincode,DISTINCT city FROM basic;
(iii) UPDATE basic SET basic_salary = basic_ salary+(basic_salary*0.1 0 ) WHERE city =’Delhi’;
(iv) SELECT name, basic_salary FROM basic WHERE name LIKE “% a “;
Question 32.
Consider a DataFrame Pop as shown below designed by Karishma, a Data Analyst that contains some data about people of different cities.
Answer the following questions:
(i) Predict the output of the following python statements
a. print(Pop.shape)
b. print(Pop[“Density”])
(ii) Delete the Avg. Income column from the DataFrame.
(iii) Write Python statement to give the Population and Density of Chennai and Agra
OR
(option for part (iii) only)
Write Python statement to import the Data from the CSV file population.csv stored at d: drive into DataFrame Pop.
Answer:
(a) (6,5)
(b)
(ii) del Pop[“Avg.Income”]
(iii) print(Pop.loc[‘Chennai’:’Agra’, ‘Population’: ’Density’]
OR
Pop = pd.read_csv(“d:\population. csv”)
Section E
Question 33.
Write the output of the following SQL queries:
(i) SELECT TRUNCATE (8.975, 2) ;
(ii) SELECT MID (‘HONESTY WINS’, 3,4);
(iii) SELECT RIGHT (CONCAT( ‘PRACTICES’ , ‘ INFORMATICS’ ) , 5) ;
(iv) SELECT DAYOFMONTH ( ‘2015-01-16’);
(v) SELECT POW(2,-3);
Answer:
(i) 8.97
(ii) NEST
(iii) ATICS
(iv) 6
(v) 0.125
OR
EMP
(i) To display the total number of employees below 25 years old.
(ii) To list names and respective salaries in descending order of salary.
(iii) To count the number of employees with names starting with ‘K’
(iv) To list names and addresses of those persons who have ‘Delhi’ in their address.
(v) To list names and addresses of those persons whose salary between 50000 and 70000;
Answer:
(i) SELECT COUNT(*) FROM Emp WHERE AGE <25;
(ii) SELECT NAME,SALARY FROM Emp ORDER BY SALARY desc;
(iii) SELECT COUNT(*) FROM Emp WHERE NAME LIKE “K%”;
(iv) SELECT NAME,ADDRESS FROM Emp WHERE ADDRESS LIKE”%Delhi%”;
(v) SELECT NAME,ADDRESS FROM Emp WHERE SALARY BETWEEN0000 AND 70000;
Question 34.
A company, Mega Enterprises has 4 wings of buildings as shown in the diagram:
Centre to centre distances between various Buildings:
W3 to W1 | 50m |
W1 to W2 | 60m |
W2 to W4 | 25m |
W4 to W3 | 170m |
W3 to W2 | 125m |
W1 to W4 | 90m |
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.
Answer:
(i) Most suitable layout according to distance is:
(ii) Bus topology
(iii) Broadband
(iv) (a) Repeater should be installed where the distance between the wings is00 meter or more.
(b) Hub/Switch is required in all blocks
(v) Radio waves
Question 35.
The price of 10 Items and the intervals are given below:
Price_item=[10,15,20,26,30,40,42,45,50,48,36]
b= [10,20,30,40,50]
Write suitable Python code to generate a histogram based on the given data, along with an appropriate chart title and both axis labels. Also give suitable python statement to save this chart.
Answer:
OR
Write the code for given bar graph.
Also given suitable python statement to save the chart.
Answer:
from matplotlib import pyplot as plt Plt.bar([0.25, 1.25, 2.25, 3.25, 4.25], [50, 40, 70, 80, 20], label = “Science”, width =.5) plt.bar([.75, 1.75, 2.75, 3.75, 4.75], [80, 20, 20, 50, 60], label =“Maths”, color = ‘r’, width = .5) plt.legend( ) plt.xlabel(‘Months‘) plt.ylabel(‘Subject‘) plt.title(‘Information‘) plt.show( ) plt.savefi("Information.jpg)