Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 9 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 9 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.
The term FTP stands for ______
(i) File transfer program
(ii) File transmission protocol
(iii) File transfer protocol
(iv) File transfer protection
Answer:
(iii) File transfer protocol
Explanation: Th term FTP stands for File Transfer Protocol.
Question 2.
The ______ process determines whether exposure to a chemical can increase the incidence of adverse health effect.
(i) Hazard identification
(ii) Exposure protocol
(iii) Toxicity assessment
(iv) Risk characterization
Answer:
(i) Hazard identification
Explanation: Hazard identifiation traces the path of the toxins and also determines the likelihood of occurrence in humans.
Question 3.
Which of the following is not an intellectual property?
(i) A poem written by a poet
(ii) An original painting made by a painter
(iii) Trademark of a Company
(iv) A remixed song
Answer:
(iv) A remixed song
Explanation: A remixed song is not an intellectual property.
Question 4.
Predict the output of the following query:
SELECT POWER (5,2);
(i) 25
(ii) 10
(iii) 25.0
(iv) 10.0
Answer:
(i) 25
Explanation: POWER( ) function is used to get the power of the given values.
Syntax: POWER (m, n)
Parameter: m: It is a base value in the calculation n:
It is exponent value in the calculation This function returns m raised to the nth power.
Question 5.
Jaya wants to display the records of her table in descending order of names of products. Which SQL clause she has to use?
(i) Group by
(ii) Order by
(iii) Between
(iv) Check
Answer:
(ii) Order by
Explanation: Th order by clause is used to arrange records of a table in ascending or descending order.
Question 6.
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 behavior. Similarly, online ethics focuses on the acceptable use of online resources in an online social environment.
Question 7.
What is the minimum number of arguments required for plot() function in matplotlib?
(i) 1
(ii) 2
(iii) 3
(iv) 4
Answer:
(i) 1
Explanation: Only one argument/set of points is required in plot( ) function. By default, the set of points will be considered as Y coordinates.
Question 8.
Mr. Saurabh is using the table student with the following columns:
RNO, Admno, Name, Aggregate
He wants to display all information of students in descending order of name and within ascending order of aggregate. He wrote the following SQL query, but he did not get the desired output.
SELECT *FROM Student ORDER BY Name, Aggregate DESC;
Which of the following is a correct query to perform the given task?
(i) SELECT *FROM Student ORDER BY Aggregate, Naine DESC ;
(ii) SELECT *FROM Student GROUP BY Aggregate, Naine DESC ;
(iii) SELECT *FROM Student ORDER BY Aggregate DESC, Name DESC ;
(iv) SELECT *FROM Student ORDER BY Aggregate HAVING, Name DESC ;
Answer:
(i) SELECT *FROM Student ORDER BY Aggregate, Naine DESC ;
Explanation: ORDERBY is used to arrange the data in ascending and descending order.
Question 9.
Predict the output of the following query:
SELECT LENGTH (LEFT (“Programming”, 5));
(i) 5
(ii) 7
(iii) 8
(iv) 6
Answer:
(i) 5
Explanation: LENGTH( ) function is used to return the length of the specifid string. It returns the length in bytes.
LEFT( ) function is used to return a specifid number of characters from the lef of the string.
Question 10.
Which function from the options given below can read the dataset from a large text file?
(i) readjson
(ii) read_pickle
(iii) read_hdf
(iv) read_csv
Answer:
(iv) read_csv
Explanation: Th Pandas read_csv() function returns a new DataFrame with the data and labels from the fie data. csv, which you specifid with the fist argument.
Question 11.
A table can contain how many primary key(s) in a database?
(i) Single
(ii) Multiple
(iii) 2
(iv) 3
Answer:
(i) Single
Explanation: A table can have only a single primary key.
Question 12.
The declaration of L: L= [1, 23, ‘hi’, 6] is represent by
(i) list
(ii) dictionary
(iii) array
(iv) tuple
Answer:
(i) list
Explanation: L is a List.
Question 13.
Which of the following plagiarism software is available under open access?
(i) Turnitin
(ii) Urkund
(iii) Viper
(iv) None of these
Answer:
(iii) Viper
Explanation: Viper is plagiarism softare that is available under open access.
Question 14.
In SQL, SUBSTR () function is equivalent to:
(i) INSTR( )
(ii) MID( )
(iii) LTRIM( )
(iv) RTRIM( )
Answer:
(ii) MID( )
Explanation: SUBSTR() is equivalent to MID() function in SQL. MID( ) function extracts a substring from a string and returns a string with given length and position.
Question 15.
An online discussion group that allows direct live communication is known as
(i) e-Mail
(ii) Hyperlink
(iii) Chat group
(iv) Webcrawler
Answer:
(iii) Chat group
Explanation: Group chat is similar to chat features in that it gives you the ability to send instant messages to others in an organization.
Question 16.
______ license is a license issued by the copyright owner to allow anyone in the world to use his or her copyright work in any manner consistent with that license.
(i) Trademarks
(ii) Patents
(iii) creative commons
(iv) None of these
Answer:
(iii) creative commons
Explanation: A creative commons license is a license issued by the copyright owner to allow anyone in the world to use his or her copyright work in any manner consistent with that license.
Question 17.
Assertion (A):- A router can be used both in LANs (Local Area Networks) and WANs (Wide Area Networks).
Reasoning (R):- It connects different networks together and sends data packets from one network to another.
(i) Both A and R are true and R is the correct explanation for A
(ii) Both A and R are true and R is not the correct explanation for A
(iii) A is True but R is False
(iv) A and R both are False
Answer:
(i) Both A and R are true and R is the correct explanation for A
Explanation: Both A and R are true and R is the correct explanation for A.
Question 18.
Assertion (A): tail() function returns first n rows from the object based on position.
Reason (R): n is the selected number of rows whose default value is 5.
(i) Both A and R are true and R is the correct explanation for A
(ii) Both A and R are true and R is not the correct explanation for A
(iii) A is True but R is False
(iv) A and R both are False
Answer:
(iv) A and R both are False
Explanation: tail() function returns last n rows from the object based on position. It is useful for quickly verifying data. Syntax, dataframe.tail(n = 5)
Here, n is the selected number of rows whose default value is 5.
Section B
Question 19.
Write two advantages and two disadvantages of bus topology.
OR
A says, “In this network topology, one malfunctioning node does not affect rest of the network and it is easy to add and remove nodes.
B says, “In this network topology, cable length required is less but if the main cable encounters some problem, whole network breaks down.
Name the topologies A and B are talking about.
Answer:
Advantages of Bus Topology:
• Easy to connect and install.
• Involves a low cost of installation time.
Disadvantages of Bus Topology:
•The entire network shuts down if there is a failure in the central cable.
•Only a single message can travel at a particular time.
OR
A → Star topology
B → Bus topology
Question 20.
The python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import Pandas as pd
dic={ ‘Name’: [‘Sapna’, ‘Anmol’, ‘Rishul’, ‘Sameep’],
‘Agg’ : [56, 67, 75, 76],
‘Age’: [16, 18, 16, 19]
df=pd.dataframe(die,columns=[‘Name’ , ‘Age’])
print(Df)
Answer:
import pandas as pd
dic={ ‘Name’: [‘Sapna’, ‘Anmol’,‘Rishul’, ‘Sameep’],
‘Agg’: [56, 67, 75, 76],
‘Age’: [16, 18, 16, 19]}
df=pd. DataFrame(dic,columns=[‘Name’,’Age’])
print(df)
Question 21.
Consider the given SQL string:
“Albus Percival Wulfric Brian Dumbledore”
Write suitable SQL queries for the following:
(i) Returns the first five words in the given string.
(ii) To extract last ten characters from the string.
Answer:
(i) SELECT LEFT(“Albus Percival Wulfric Brian Dumbledore”,5);
(ii) SELECT RIGHT(“Albus Percival Wulfric Brian Dumbledore”,10);
Question 22.
Predict the output of the given Python code:
import pandas as pd
data- [{‘a’: 1, ‘b’: 2],{‘a’: 5, ‘b’: 10, ‘c’: 20}]
#With two column indices, values same as dictionary keys
df1 = pd.DataFrame(data, index=[‘first’, ‘second’], columns=[‘a’, ‘b’])
#With two column indices with one index with other name
df2 = pd.DataFrame(data, index=[‘first’, ‘second’], columns=[‘a’, ‘bl’])
print (df1)
print (df2)
Answer:
Question 23.
Write examples of identity theft.
Answer:
Examples of Identity Theft:
(i) Financial identity theft: When the stolen identity is used for financial gain.
(ii) Criminal identity theft: Criminals use a victim’s stolen identity to avoid detection of their true identity.
(iii) Medical identity theft: Criminals can seek medical drugs or treatments using a stolen identity.
Question 24.
Complete the given Python code to get the required output of whole Dataframe.
import ____ as pit
days = [50, 80, 70, 80, 40, 20, 20, 20, 70, 20, 60, 20, 80,50, 40, 50, 20, 60, 60, 60]
____ = [0,10,20,40,50,60,70,80,90,100]
pit.hist(days, bins, histtype=’stepfilled’, rwidth=0.88)
pit.____ (‘Distance in kms’)
pit.ylabel(‘Kilometer count’)
title ( ‘Bike Details Histogram’)
Answer:
import matplotlib.pyplot as plt
days = [50, 80, 70, 80, 40, 20, 20, 20, 70, 20, 60, 20, 80, 50, 40, 50,20, 60, 60, 60]
bins =[0,10,20,40,50,60,70,80,90,100]
plt.hist(days, bins, histtype=’stepfiled’, rwidth=0.88)
plt.xlabel(‘Distance in kms’)
plt.ylabel(‘Kilometer count’)
plt.title(‘Bike Details Histogram’)
Question 25.
A table, Teacher has been created in a database with the following field:
Tcode, Tname, Dept, Post, Salary
Give the SQL command to make Tcode as the primary key
Then after write a query to increase the salary of “Computer” department teachers by 25%.
Answer:
ALTER table Teacher ADD Primary key(Tcode)
Update teacher Set Salary =Salary +Salary *0.25 where Dept=”Computer”;
Section C
Question 26.
Based on the SQL table HOSPITAL, write suitable queries for the following:
(i) To reduce Rs 200 from the charge of female patients who are in Cardiology department.
(ii) To insert a new row in the above table with the following data :
11, ’Rakesh’, 45, ’ENT’, {08/08/08},1200, ’M’
(iii) To remove the rows from the above table where age of the patient >60.
Answer:
(i) UPDATE HOSPITAL SET CHARGE = CHARGE – 200 WHERE (DEPARTMENT =‘CARDIOLOGY’ AND SEX = ‘f’;
(ii) INSERT INTO HOSPITAL VALUES (11,‘Rakesh’,45,‘ENT’,{08/08/08}, 1200, ‘M’);
(iii) DELETE FROM HOSPITAL WHERE AGE > 60;
OR
Predict the output of the following queries based on the table HOSPITAL given above:
(i) SELECT MAX (DATEOFADMIN) FROM HOSPITAL;
(ii) SELECT AVG (CHARGE) FROM HOSPITAL WHERE Sex = “F”;
(iii) SELECT MIN (AGE) FROM HOSPITAL;
Answer:
(i) 24/11/06
(ii) 300
(iii) 16
Question 27.
Consider the following data frame of automobile
(i) From the given data set print first and last five rows
(ii) Find the most expensive car company name
(iii) Sort all cars by price columns
Answer:
(i) df.head(5) df.tail(5)
(ii) df = df [[‘company’,’price’]][df.price==df[‘price’].max()]
(iii) carsDf = carsDf.sort_values(by=[‘price’, ‘horsepower’], ascending=False)
Question 28.
Write MySQL statements for the following:
(i) Create a database COMP and a table Job with following specification:
Name of Column Type
Job_ID Number(4)
Jobdes Varchar(30)
Alloc_on Date Dueon Date Empid Number(4)
(ii) Ensure the following specification in created table:
Job_ID should be declared as Primary Key Job_des, Alloc_on, Due on cannot be left blank
Emp id is foreign key here that us related to ID column of earlier created table Employee.
Answer:
(i) CREATE DATABASE COMP;
(ii) mysql>CREATE TABLE Job (Job_ID NUMBER(4) PRIMARY KEY, Job_des VARCHAR(30) NOT NULL, Alloc_on DATE NOT NULL, Due_on DATE NOT NULL, Emp_id NUMBER(4) REFERENCES Employee(ID));
Question 29.
Sutapa received an email from her bank stating that there is a problem with her account. The email provides instructions and a link, by clicking on which she can logon to her account and fix the problem.
Based on the given information, answer the questions given below.
(i) Identify and explain the type of cybercrime she is a victim of.
(ii) Help Sutapa by telling her the precautions she should take when she receives these type of emails.
(iii) How harmful is phishing?
Answer:
(i) Phishing.
A technique for attempting to acquire sensitive data, such as bank account numbers, through a fraudulent solicitation in e-mail or on a web site, in which the perpetrator masquerades as a legitimate business or reputable person.
(ii) She should check whether it is a valid bank site or not by checking in the url https. It is always better to type the url and then login to the site. She should not click on the link provided in the e-mail.
(iii) Phishing emails can often have real consequences for people who give scammers their information, including identity theft. And they might harm the reputation of the companies they’re spoofing.
OR
When you search online for pictures, how will you find pictures that are available in the free public domain? How can those pictures be used in your project without copyright violations?
Answer:
Searching for pictures online is easy, you will find what you are looking for but look for the additional information provided on the website hosting those images usually they have a written note at the end of every image. If the image is available for free or have some copyright in which case you will be directed either to pay for using it or having a citation to the original creator where you will be using that picture.
Question 30.
Sanyukta is the event in-charge in a school. One of her students gave her a suggestion to use Python Pandas and
Matplotlib for analysing and visualising the data, respectively. She has created a Data frame “SportsDay” to keep track of the number of First, Second and Third prizes won by different houses in various events.
Write Python commands to do the following:
(i) Display the house names where the number of Second Prizes are in the range of 12 to 20.
(ii) Display all the records in the reverse order.
(iii) Display the bottom 3 records.
Answer:
(i) df[‘Name’][(df[‘Second’]>=12) & (df[‘Second’]<=20)]
(ii) print(df.iloc[::-1])
(iii) df.tail(3)
Section D
Question 31.
Riya manages database in a Library. For storing records purposes, she created a table named BOOK. Assist her by writing the following queries:
Table: Book
Table: issued
Book_Id | Quantity Issued |
T0001 | 4 |
C0001 | 5 |
F0001 | 2 |
(i) To show book name, Author name and price of books of First Pub. Publisher
(ii) To list the names from books of text type
(iii) To Display the names and price from books in ascending order of their prices.
(iv) To increase the price of all books of EPB publishers by 50.
Answer:
(a) Select book_name, author_name , price from books where publisher=’First Publ’ ;
(b) Select book_name from books where type=’Text’ ;
(c) Select book_name, price from books Order by Price;
(d) Update books set price=price+50 where publishers=’EPB’;
Question 32.
Observe the given DataFrame:
Answer the following questions:
(i) a. Write command to compute sum of every column of the data frame.
b. Write command to compute transpose of the data frame df.
(ii) Delete the first row from the DataFrame.
(iii) Write Python statement to add a new column Net which is multiply of Sales and Quarter.
OR
Write statement to rename the column ‘Quarter’ to ‘Remark’ in the DataFrame df.
Answer:
(i) a. df1.sum()
b. df1.T
(ii) df=df.drop(0) (iii) df[“Net”]=df[“
Sales”]+df[“Quarter”]
OR
df.rename(columns={‘Quarter’:’Remark’},inplace=True)
Section E
Question 33.
Write suitable SQL queries for the following:
(i) To display the first 4 letters of the string “SQL Database”.
(ii) to display square root of 144 rounded by 2 decimal digits.
(iii) To display the name of eldest employee and his/her date of birth
(iv) To display the substring “Indi” from the string “Visit India”.
(v) To display the string “management” in upper case.
Answer:
(i) SELECT LEFT (“SQL Database”,4);
(ii) SELECT ROUND (SQRT(144), 2);
(iii) SELECT ENAME,MIN(YEAR(DOB)) FROM EMP;
(iv) SELECT MID (‘Visit India’, 6, 5);
(v) SELECT UCASE (“management”);
OR
TABLE: GRADUATE
Write SQL queries to the perform the following task:
(i) List the names of those students who have obtained DIVI sorted by NAME.
(ii) Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a year assuming that the STIPEND is paid every month.
(iii) To count the number of students who are either PHYSICS or COMPUTER SC graduates.
(iv) To insert a new row in the GRADUATE table ll,”KAJOL”, 300, “COME SC.”, 75,1
(v) delete the table.
Answer:
(i) SELECT NAME FROM GRADUATE WHERE DIV=’I’ ORDER BY NAME;
(ii) SELECT NAME, STIPEND, SUBJECT, STIPEND*12 STIPEND_YEAR FROM GRADUATE;
(iii) SELECT SUBJECT, COUNT(NAME) FROM GRADUATE GROUPBY (SUBJECT) HAVING SUBJECT=’PHYSICS’ OR SUBJECT=’COMP.Sc.’;
(iv) INSERT INTO GRADUATE VALUES(11, ’KAJOL’,300,’COMP. Sc.’,75,1);
(v) DROP TABLE STUDENT;
Question 34.
SunRi.se Pvt. Ltd. is setting up the network in the Ahmadabad. There are four departments named as MrktDept, FunDept, LegalDept, SalesDept.
Distance between various buildings is given as follows:
MrktDept to FunDept | 80m |
MrktDept to LegalDept | 180m |
MrktDept to SalesDept | 100m |
LegalDept to SalesDept | 150m |
LegalDept to FunDept | 100m |
FunDept to SalesDept | 50m |
Number of Computers in the buildings:
MrktDept | 20 |
LegalDept | 10 |
FunDept | 08 |
SalesDept | 42 |
(i) Suggest a cable layout of connections between the Departments and specify topology.
(ii) Suggest the most suitable building to place the server with a suitable reason.
(iii) Suggest the placement of i) modem ii) Hub /Switch in the network.
(iv) The organization is planning to link its sale counter situated in various part of the same city/ which type of network out of LAN, WAN, MAN will be formed?
(v) Name the protocol:
a. Used to transfer voice using packet switched network.
b. Used for chatting between 2 groups or between 2 individuals.
Answer:
(i) Star Topology should be used.
(ii) As per 80 – 20 rule, MrktDept beacause it has maximum no. of computers.
(iii) Each building should have hub/switch and Modem in case Internet connection is required.
(iv) MAN (Metropolitan Area Network)
(v) a. VoIP (Voice Over Internet Protocol)
b. IRC(Internet Relay Chat)
Question 35.
The price of 11 Items and the intervals are given below:
Price =[102,120,130,132,134,152,190,170,175,164,163]
b= [110, 120, 130, 14 0, 150, 160, 170, 180, 190]
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 suitable Python code to create ‘EPICInfo’ Bar Chart as shown below:
Answer:
from matplotlib import pyplot as plt
x = [5,8,10]
y = [12,16,6]
x2 = [6,9,11]
y2 = [6,15,7]
plt.bar(x, y, align=’center’)
plt.bar(x2, y2, color=’g’, align=’center’)
plt.title(‘Epic Info’)
plt.ylabel(‘Y axis’)
plt.xlabel(‘X axis’)
plt.show( )