Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 3 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 3 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.
…………… network device stores the IP addresses.
(i) Router
(ii) Switch
(iii) Both (i) & (ii)
(iv) None of these
Answer:
(i) Router
Explanation: The router is a networking device that is designed to receive, analyze, and forward data , packets between computer networks.
Question 2.
An incident can be called hazardous only when?
(i) Stressor has the potential to cause harm to humans and ecological systems.
(ii) Poses threat to surrounding
(iii) Monitoring is failed
(iv) Outburst of chemicals
Answer:
(i) Stressor has the potential to cause harm to humans and ecological systems.
Explanation: An incident is called hazardous only when the contaminant poses threat to humans and ecological systems which may results in catastrophic.
Question 3.
Intellectual Property rights are an important aspect in international trade. is covered under IPR.
(i) Patents
(ii) Copyrights
(iii) Trademarks
(iv) All of these
Answer:
(iv) All of these
Explanation: Intellectual Property rights are an important aspect in international trade. All of these are covered under IPR.
Question 4.
Predict the output of the following query:
SELECT MOD (28,-3);
(i) 0
(ii) NULL
(iii) NaN
(iv) 1
Answer:
(iv) 1
Explanation:
Question 5.
Which of the following SQL functions belongs to the aggregate functions category?
(i) NOW ( )
(ii) COUNT(*)
(iii) UCASE ( )
(iv) TRUNCATE ( )
Answer:
(ii) COUNT(*)
Explanation: COUNT(*) belongs to Date and Time library functions.
Question 6.
MySQL is …………. under the terms of the GNU General Public License.
(i) Office
(ii) Firefox
(iii) FOSS
(iv) All of these
Answer:
(iii) FOSS
Explanation: MySQL is a Free and Open-Source Software (FOSS).
Question 7.
C in CSV stands for:
(i) Comma
(ii) Cyber
(iii) Computer
(iv) None of these
Answer:
(i) Comma
Explanation: A CSV (comma-separated values) file is a text file that has a specific format which allows data to be saved in a table structured format.
Question 8.
Sam, a Database Administrator, needs to display the Total pay of all workers from those departments which have more than four employees, he is experiencing a problem while running the following query:
SELECT DEPT, Total(PAY) FROM EMP ORDER BY DEPT HAVING COUNT () >4;
Which of the following is a correct query to perform the given task?
(i) SELECT DEPT, TOTAL(*) FROM EMP WHERE COUNT(*) > 5 GROUP BY DEPT
(ii) SELECT DEPT, ADD (*) FROM EMP HAVING COUNT (*) > 5 GROUP BY DEPT;
(iii) SELECT DEPT, SUM (PAY) FROM EMP GROUP BY DEPT HAVING COUNT(*)>4;
(iv) SELECT DEPT, SUM(PAY) FROM EMP GROUP BY DEPT WHERE COUNT(*) > 4
Answer:
(iii) SELECT DEPT, SUM (PAY) FROM EMP GROUP BY DEPT HAVING COUNT(*)>4;
Explanation: To put a condition in a group in my SQL we need to use having clause on the other hand if we want to put condition for all individual host then we need to use where clause. Order by is used to arrange the data in ascending and descending order while group by is used to segregate the data into different groups.
Question 9.
Predict the output of the following query:
SELECT UCASE (DAYNAME (“2023-05-11”));
Provided “2023-01-01” is Sunday.
(i) SUNDAY
(ii) MONDAY
(iii) THURSDAY
(iv) The corresponding month number when we execute the query.
Answer:
(iii) THURSDAY
Explanation:
Question 10.
Which of the following command will show the first 8 rows from a Pandas Series named NP?
(i) NP.head( )
(ii) NP.head(8)
(iii) Both (i) & (ii)
(iv) None of these
Answer:
(ii) NP.head(8)
Explanation: The head( ) method returns a specified number of first rows. The head() method returns the first 5 rows if a number is not specified.
Question 11.
With reference to SQL, identify the invalid data type for floating point number Values.
(i) FLOAT ( )
(ii) DOUBLE( )
(iii) DECIMAL ( )
(iv) None of these
Answer:
(iv) None of these
Explanation: FLOAT, DOUBLE & DECIMAL are the DataTypes which can store a floating point number Values.
Question 12.
In Python programming will be the output of the given expression:-
print(print( ),”of the above”)
(i) ” “of the above
(ii) Syntax Error
(iii) None of these
(iv) All of these
Answer:
(iii) None of these
Explanation: The inner print function will display “None” and this value will be concatenated with “of the above”. So, the overall output will be “None of the above”.
Question 13.
You are guilty of plagiarism if you:
(i) Make use of the works of others to gather information.
(ii) Use the work of another and represent it as your own.
(iii) Make use of the works of others to support your own arguments.
(iv) Examine the ideas and arguments of others to help you shape your own thoughts or views on a particular issue.
Answer:
(ii) Use the work of another and represent it as your own.
Explanation: This is plagiarism because you are deliberately trying to suggest that the clever idea or wording was your own creation, which is a lie, and, of course, plagiarism.
Question 14.
In SQL, LENGTH ( ) function is equivalent to:
(i) LEN( )
(ii) TRIM( )
(iii) COUNT( )
(iv) None of these
Answer:
(iv) None of these
Explanation: There is no such function is available in the given list which is equivalent to LENGTH().
Question 15.
………….. is a service provided by companies that sell or lease space on a server where you store files that enable your website accessibility on the internet.
(i) Website
(ii) WebBrowser
(iii) Web Server
(iv) Web Hosting
Answer:
(iv) Web Hosting
Explanation: Web hosting is a service provided by companies (e.g., the web host) that sell or lease space on a server where you store files that enable your website accessibility on the internet.
Question 16.
icon stands for ………
(i) Creative Crafts
(ii) Copyright
(iii) Creative Commons
(iv) Crafty Commons
Answer:
(iii) Creative Commons
Explanation: Above icon represents Creative Commons.
Question 17.
Assertion (A):- The basic role of bridges in network architecture is storing and forwarding frames between the different segments that the bridge connects.
Reasoning (R): – They use hardware Media Access Control (MAC) addresses for transferring frames.
(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: The statement Assertion & reason both are True, and Reason is the. correct explanation of Assertion
Question 18.
Assertion (A):- DataFrame is a multidimensional data structure.
Reasoning (R): – To use DataFrame in a program we need not to import pandas library.
(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:
(iii) A is True but R is False
Explanation: The statement Assertion is True but reason is false.
Section B
Question 19.
Differentiate between web browser and search engine.
OR
Ayus is doing a course in networking. He is unable to understand the concept of ISE Help her by explaining it with the help of suitable example.
Answer:
Web Browser: The web browser is an application software that is developed to retrieve and view the information from web pages or HTML files present on the web servers. The first web browser was invented by Sir Tim Berners-Lee in 1990 and the very first graphical web browser was developed in 1993 and is named the mosaic. After that, various web browsers were developed. Some of them are navigator which is developed by Netscape communication, Microsoft Edge, Google Chrome, Mozilla Firefox, Opera, and Apple safari
Search Engine: A search engine is a kind of website through which users can search the content available on the Triternet. For this purpose, users enter the desired keywords into the search field. Then the search engine looks through its index for relevant web pages and displays them in the form of a list. The Internet is a huge source of information & resources and to access the resource from the Internet there are some kinds of software, this software is known as a Search Engine. Some of the popular ones are Google, Bing, Yahoo, Duck duck go etc.
OR
An internet service provider (ISP) is a company that provides access to the internet. ISPs can provide this access through multiple means, including dial-up, DSL, cable, wireless and fiber-optic connections. A variety of companies serve as ISPs, including cable providers, mobile carriers, and telephone companies.
Example: Jio, Airtel, etc.
Question 20.
The python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import Pandas as pd COMP ={"slid":["AB102","AB103","AB104"], "DEPT" : ["CHEM", "ACCT", "MNGR"] } df= Pd.dataframe(comp) print(Df)
Answer:
import pandas as pd COMP = {"slid”:["AB102","AB103", "AB104"],"DEPT":["CHEM","ACCT", "MNGR"]} df=pd.DataFrame(COMP) print(df)
Question 21.
Consider the given SQL string: “This is the Informatics Practices Examination”
Write suitable SQL queries for the following:
(i) Returns the position of the first occurrence of the substring “the” in the given string.
(ii) To extract last eleven characters from the string.
Answer:
(i) SELECT INSTR (“This is the Informatics Practices Examination”,”the”);
(ii) SELECT RIGHT (“This is the Informatics Practices Examination”,11);
Question 22.
Predict the output of the given Python code:
import pandas as pd a = pd.DataFrame ([5,8,9], index = ["first", "second","Third"], columns = ["data"]) print(a[2:0:-1])
Answer:
Output
Question 23.
What is a digital footprint and why is it important?
Answer:
Your digital footprint is the record of all your interactions online. Once something is posted or shared online, it can be there forever. Understanding your digital footprint helps you choose and control what you leave online for others to find.
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= {"Rollno": [1, 2, 3], "Name": ["Abir", "Ayus", "Arman"], "Age": [15, 14, 14], "Marks": [77.9, 70.4, 60.9], "Grade": ["11B", "11A", "11B"]} df = pd.DataFrame (t,index=[10, 20,30]) print (df)
Question 25.
Which aggregate function is required to calculate the maximum salary in my SQL table? Give the syntax to get 2nd max salary in SQL?
Answer:
The aggregate function max( ) is required to calculate the maximum value with in a particular column.
SELECT MAX(SALARY) FROM Employee WHERE SALARY < (SELECT MAX(SALARY) FROM Employee); Where consider column name is SALARYand the table name is Employee.
Section C
Question 26.
Based on the SQL table Garment, write suitable queries for the following:
Table: Garment
(i) Write the command to display the total price of those garments that are available in “XL” size.
(ii) Write the command to count those garments that have their names starting with “Ladies”.
(iii) Select the records that have a price above the average price.
Answer:
(i) Select Sum (Price) from Garment where size= “XL”;
(ii) Select Count(*) from Garment where Gname like “Ladies%”;
(iii) SELECT * FROM Garment WHERE Price > (SELECT AVG(Price) FROM Garment);
OR
Predict the output of the following queries based on the table Garment given above:
(i) Select AVG(Price) AS “AVG PRICE” from Garment where size= “L”;
(ii) Select Count(*) from Garment where Gname like “T%”;
(iii) Select MIN(Price) from Garment;
Answer:
(i) AVG PRICE
433.33
(ii) 2
(iii) 1100.00
Question 27.
Write python code to create the following series:
101 Harsh
102 Arun
103 Manna
104 Hennat
105 Danny
106 Eat ima
And also display all the names from last to first.
Answer:
import pandas as pd s=[101,102,103,104,105,106] k=["Harsh","Arun","Manna", "Danny", "Fatima"] df=pd.Series(k,index=s) print(df) print(df[::-1])
Question 28.
Write MySQL statements for the following:
(i) To create a database named XY Z HOS PITAL.
(ii) To create a table named DOCTOR based on the following specification:
Column Name | Data Type | Constraints |
SL_NO | Integer | Primary Key |
DNAME | Varchar(20) | NOT NULL |
V_HRS | FLOAT | UNIQUE |
Answer:
(i) CREATE DATABASE XYZ_HOSPITAL;
(ii) CREATE TABLE DOCTOR (SL_NO INTEGER
PRIMARY KEY, DNAME VARCHAR(20) NOT NOLL,V_HRS FLOAT UNIQUE);
Question 29.
Sanjay, a student of class 12 had opened a Instagram account newly. He received Friend request from a group of class 12 girls from his school. After some time, He starts getting negative comments on his posts. Based on the given information, answer the questions given below.
(i) Identify the type of cybercrime he is a victim of.
(ii) What is the conclusion of cyberbullying?
(iii) What are the direct effects of cyberbullying?
Answer:
(i) He is a victim of Cyber Bullying.
(ii) Conclusion; In conclusion, cyber bullying has very damaging consequences to individuals. It disrupts school life, has great emotional damage and may have fatal consequences. Though technology has brought new opportunities for students and teenagers, it is important that everyone learn to use it responsibly.
(iii) The effects of cyberbullying also include mental health issues, increased stress and anxiety, depression, acting out violently, and low self-esteem. Cyberbullying can also result in long lasting emotional effects, even if the bullying has stopped.
OR
What are the precautions to prevent the hazard?
Answer:
Sometimes using more than one control measure could be the most effective way to reduce the exposure to hazards. ‘
1 Eliminate the hazard. Remove it completely from your workplace.
2 Substitute the hazard.
3 Isolate the hazard.
4 Use engineering controls.
5 Use administrative controls.
6 Use personal protective equipment (PPE)
Question 30.
Consider the given DataFrame’Furniture’:
Furniture
Fcode | Name | Price |
10023 | Table | 4000 |
10001 | Chair | 2050 |
10012 | Sofa | 3500 |
Write suitable Python statements for the following:
(i) Calculate Tax as 10% of price and assign to column “Tax”.
(ii) Calculate the Amt as Price -Tax.
(iii) Display the DataFrame.
Answer:
import pandas as pd s={"Fcode":[10023,10001,10012], "Name":["Table","Chair","Sofa"], "Price":[4000,2050,3500]} df=pd.DataFrame(s) df["Tax"]=df["Price”]*10/100 #. ..i. df["Amt”]=df["Price"]-df["Tax" ] #..ii. print(df) #.iii.
Section D
Question 31.
Consider the following table:
SchoolBus
Write the SQL commands for the following:
(i) To count number of school Bus transporter wise.
(ii) To show transporter wise average charges for all routes having charges more than 60000.
(iii) To show transporter wise total number of students travelling.
(iv) To show transporter wise maximum capacity.
Answer:
(i) SELECT toUNT (*) FROM SCHOOLBUS GROUPBY TRANSPORTER;
(ii) SELECT AVG (CHARGES) FROM SCHOOLBUS GROUPBY TRANSPORTER HAVING CHARGES >60000;
(iii) SELECT SUM (NOOFSTUD) FROM SCHOOLBUS GROUPBY TRANSPORTER;
(iv) SELECT MAX (CAPACITY) FROM SCHOOLBUS GROUPBY TRANSPORTER;
Question 32.
Ayus, a Data Analyst with a multinational brand has designed the DataFrame Df:
Answer the following questions:
(i) Predict the output of the following python statement:
a. print (df. loc [0 : 2, : 1: 3] )
b. print(df3.iloc[0:3,])
(ii) Delete the last column from the DataFrame.
(iii) Write Python statement to add a new column total which is the Average of all the values.
OR (Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named book. csv stored at D: drive.
Answer:
import pandas as pd s={0:[20,40,60], 1: [40, 10, 60], 2:[75,27,71], 3: [86, 73,40] } df=pd.DataFrame(s) print(df.loc[0:2,:1:3] print(df.iloc[0:3,])
Output
(ii) df.pop(3)
(iii) df [‘total’]=(df [0]+df [1]+df [2]+df[3])/4
Section E
Question 33.
Write the SQL queries which will perform the following operations:
(i) To get the length of a string in characters.
(ii) to get a specified number of leftmost character from a string.
(iii) To get the name of a weekday for specified date.
(iv) To return the weekday index of a date.
(v) To return the number of rows, including rows with NULL values.
Answer:
OR
Consider the following table named “GARMENT”.
Table:Garment
Write SQL queries using SQL functions to perform the following operations:
(i) Display name and price after rounding off to one decimal place.
(ii) Display all the Gname in upper case.
(iii) Display the last three characters from Gname.
(iv) Display the highest Geode from the table.
(v) Display the sum of all price of size “L”.
Answer:
(i) SELECT GNAME, ROUND (PRICE, 1) FROM GARMENT;
(ii) SELECT UCASE (GNAME) FROM GARMENT;
(iii) SELECT RIGHT (GNAME, 3) FROM GARMENT;
(iv) SELECT MAX (GCODE) FROM GARMENT;
(v) SELECT SUM(PRICE) FROM GARMENT WHERE SIZE=’L’;
Question 34.
A company in Mega Enterprises has 4 wings of buildings as shown in the diagram.:
Center to center 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)
(ii) The most suitable topology is Bus topology.
(iii) Since the building wl is having most number of computers that is 150. So, as per 80-20 rule the most suitable place to set up the server is the building wl and we need to place a modem in the building wl to get the internet connectivity in all the ways via network.
(iv) Hub/Switch is required in all the buildings. Repeater is required where the distance is more than 100 M to amplify the signal. So, within W4 to W3 and W3 to W2 repeater may be placed.
(v) Microwave or Radiowave connection.
Question 35.
The price of 10 Items and the intervals are given below:
Price_item=[20,23,22,56,42,58,65,96,75,48,36]
b=[10,20,30, 40,50, 60,70, 80, 90, 100]
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:
import matplotlib.pyplot at plt Price_item=[20,23,22,56,42,58,65,96,75,48,36] b=[l0,20,30,40,50, 60,7 0, 80, 90, 100] plt.hist(Price_item,bins=b) plt.title("Hist_Chart") plt.xlabel("X-axis") plt.ylabel("Y-axis") plt.show( ) plt. savefig ("sample . jpg")
OR
Write suitable Python code to create ‘CITY_Info’ Bar Chart as shown below:
Answer:
import matplotlib.pyplot aS pit CITY = (’KOLKATA', ’DELHI’, 'MUMBAI', ’PUNE’) RAINFALL=[5,7,10,9] plt.bar(CITY, RAINFALL,Color=["r","k","c","y”] plt.title("CITY_Info") plt.ylabel("AVG RAINFALL") plt.xlabel("CITY") plt.show( ) plt. savefig ("RAINFALL, jpg")