Students must start practicing the questions fromĀ CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 2 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 2 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.
A ………….. is an electronic device that converts digital data signals into modulated analog signals suitable for transmission over analog telecommunications circuits.
(i) Hub
(ii) Modem
(iii) Gateway
(iv) Repeater
Answer:
(ii) Modem
Explanation: A Modem is an electronic device that converts digital data signals into modulated analog signals suitable for transmission over analog telecommunications circuits.
Question 2.
What is the hazardous pollutant release from LED’S?
(i) Arsenic
(ii) Barium
(iii) Cobalt
(iv) Cadmium
Answer:
(ii) Barium
Explanation: Electron tube, filler for Plastic and Rubber, additives release barium into the environment.
Question 3.
Intellectual property right (IPR) protect the use of information and ideas that are of …………
(i) ethical value
(ii) social value
(iii) commercial value
(iv) sentimental value
Answer:
(iii) commercial value
Explanation: Intellectual Property Rights IPRS protect the use of information and ideas that are of commercial value. The four main types of intellectual property rights are include trademark, copyright, patent and trade secrets.
Question 4.
Predict the output of the following query:
SELECT MOD (50,3);
(i) 0
(ii) NULL
(iii) NaN
(iv) 2
Answer:
(iv) 2
Explanation:
Question 5.
Which of the following SQL functions belongs to the DATE functions category?
(i) NOW ( )
(ii) TRUNCATE ( )
(iii) UCASE ( )
(iv) Both i and (ii)
Answer:
(i) NOW ( )
Explanation: NOW() belongs to Date and Time library functions.
Question 6.
Python is a …………… tool.
(i) Office
(ii) Firefox
(iii) FOSS
(iv) All of the above
Answer:
(iii) FOSS
Explanation: Python is a Free and Open-Source Software (FOSS).
Question 7.
V in CSV stands for:
(i) Vector
(ii) Value
(iii) Variable
(iv) None of the above
Answer:
(ii) Value
Explanation: CSV stands for Comma Separated Value.
Question 8.
Rani, a Database Administrator, needs to display the Maximum pay of workers from those departments which have more than four employees. She is experiencing a problem while running the following query:
SELECT DEPT, MAX(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, MAX(*) FROM EMP WHERE COUNT (*) > 5 GROUP BY DEPT;
(ii) SELECT DEPT, COUNT (*) FROM EMP HAVING COUNT(*) > 5 GROUP BY DEPT;
(iii) SELECT DEPT, MAX (PAY) FROM EMP GROUP BY DEPT HAVING COUNT(*)>4;
(iv) SELECT DEPT, MAX(PAY) FROM EMP GROUP BY DEPT HAVING COUNT(*) > =4;
Answer:
(iii) SELECT DEPT, MAX (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 LCASE (MONTH (NOW( )));
(i) june
(ii) april
(iii) may
(iv) The corresponding month number when we execute the query.
Answer:
(iv) The corresponding month number when we execute the query.
Explanation: This query returns the month number for the current date that means whenever we will run the query on those particular dates corresponding months number in lowercase letters.
Question 10.
Which of the following command will show the first 10 rows from a Pandas Series named NP?
(i) NP. head ( )
(ii) NP. head (10)
(iii) Both of the above
(iv) None of the above
Answer:
(ii) NP. head (10)
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 TEXT Values.
(i) CHAR
(ii) VARCHAR
(iii) FIXCHAR
(iv) None of the above
Answer:
(iii) FIXCHAR
Explanation: The only vary data type which are available in my SQL library to store the textual values are CHAR and VARCHAR.
Question 12.
In Python programming ………… will be the output of the given expression:
print(print(6 > 2))
(i) True (ii) False
(iii) True-True
(iv) True-None
Answer:
(iv) True-None
Explanation: The inner print will display true since the expression 6 >2 is valid while the outer print will display None as there is no return value by the inner expression.
Question 13.
Plagiarism where the writer changes a few words in the original text of another is known as
(i) Direct copy
(ii) Words switch
(iii) Paraphrasing
(iv) None of these
Answer:
(ii) Words switch
Explanation: Plagiarism where the writer changes a few words in the original text of another is known as Words switch.
Question 14.
In SQL, LEFT ( ) function is equivalent to:
(i) MIDO
(ii) TRIM()
(iii) SUBSTR ( )
(iv) Both i and iii
Answer:
(iv) Both i and iii
Explanation: In SQL, SUBSTR( ) function is equivalent to: MID() and LEFTQ
Question 15.
A web page (or webpage) is a specific collection of information provided by a website and displayed to a user on a ……………
(i) Website
(ii) WebBrowser
(iii) Web Server
(iv) Web Hosting
Answer:
(ii) WebBrowser
Explanation: A web page (or webpage) is a specific collection of information provided by a website and displayed to a user on a web browser.
Question 16.
The ONE Creative Commons condition that is always included in every CC licence is:
(i) ShareAlike (SA)
(ii) No Derivatives (ND)
(iii) Non Commercial (NC)
(iv) Attribution (BY)
Answer:
(iv) Attribution (BY)
Explanation: The ONE Creative Commons condition that is always included in every CC licence is: Attribution (BY).
Question 17.
Assertion (A):- The device switch works like a signal amplifier.
Reasoning (R):- Switch is required for stable Internet Connection.
(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 is false but R is True
Answer:
(iii) A is True but R is False
Explanation: The statement Assertion is True but reason is false. Switch is a hardware device and it is used to Amplifier the signal if the distance is more than 100 M we need a sweet, in that case to amplify the signal. Modem is required for a stable Internet connection.
Question 18.
Assertion (A):- To use the matplotlib library in a Python program, the import statement is optional.
Reasoning (R):- The only alias name that can be used with the matplotlib.pyplot library is pd. 1
(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: We need to import the library to use its functions. We can use any alias name for matplotlib.pyplot library.
Section – B
Question 19.
Briefly explain the basic concepts of a web Hosting and web browsing.
OR
Bithika is doing a course in networking. She is unable to understand the concept of TCP/TE Help her by explaining it with the help of suitable example.
Answer:
Web hosting is an online service that allows you to publish your website files onto the internet.
Web Browsing is the act of looking through a set of information quickly, without a specific sense of purpose. In the context of the internet, it usually refers to using the world wide web.
OR
TCP/IP stands for Transmission Control Protocol/ Internet-Protocol and is a suite of communication protocols used to interconnect network devices on the internet T CP/IP isalsousedasa communications protocol in a private computer network.
Question 20.
The python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import Pandas as pd df ={"ENG";["MATH","CHEM","PHYS"],"MEDICAL";["Biology","Bio-Tech","MICRO BIO"]} df= pd.dataframe(df) print(df)
Answer:
import pandas as pd df ={"ENG": ["MATH","CHEM","PHYS"] , "MEDICAL":["Biology","Bio- Tech", "MICRO BIO"]} df= pd.DataFrame(df) print(df)
Question 21.
Consider the given SQL string:
“the quick brown fox jumps over the lazy dog”
Write suitable SQL queries for the following:
(i) Returns the word fox in capital letters.
(ii) To display the total number of characters present in the last word of the given sentence.
Answer:
(i) SELECT UCASE (SUBSTR ( ” the quick brown fox jumps over the lazy dog”,17,3));
(ii) SELECT LENGTH (RIGHT (“the quick brown foat jumps over the lazy dog”,3));
Question 22.
Give the output of the code:
import pandas as pd a = pd.DataFrame ([1, 2,"", 3], index = ["One", "Two","Three", "Four"], columns = ["First"]) print(a[1:3])
Answer:
Output
First
Two
Three
Question 23.
What are the 4 types of digital footprint?
Answer:
Types Of Digital Footprints :
(i) Passive: It is not the user’s intention.
(ii) Active: The information that an individual knowingly shares with the public or with contacts.
(iii) Personally identifiable: The information linked to the individual’s real name.
(iv) Anonymous: Anonymous data collection.
Question 24.
Complete the given Python code to get the required output of whole Dataframe.
import _____ 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 = _____.DataFrame (_____, index=[10, 20, 30]) 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.
What does aggregate function return SQL?
Answer:
Aggregate functions return a single value, calculated from values in a column. They take a set of values as their argument. Aggregate functions are also called set functions. A basic aggregate function returns a single value by aggregating mulitple rows of data.
Section C
Question 26.
Consider the following table and answer the given questions
Table Name: STUD
Write suitable queries for the following:
(i) Display average marks of all students whose name starts with ‘A’.
(ii) Display lowest marks.
(iii) Display the records in the ascending order of marks.
OR
What will be the output of the following query:
(i) SELECT MIN(Adm_Date) FROM STUD;
(ii) SELECT COUNT(*) FROM STUD WHERE MARKS >90;
(iii) SELECT POW(SUM(marks) ,2) FROM STUD;
Answer:
(i) Select AVG(mark) from STUD WHERE S_ NAME LIKE ‘A%’;
(ii) Select MIN (marks) from STUD;
(iii) Select * from STUD order by marks ;
OR
(i) 1998-10-02
(ii) 2
(iii) 110224.00
Question 27.
Create a Data Series in Python from the given list:
{ ‘abc’ : [1,2,3] , ‘bed’ : [2,2,6] ,’ cxv’ : [3,5,4] } Also give appropriate column headings as shown below:
abc [1, 2, 3]
bed [2, 2, 6]
cxv [3, 5, 4]
dtype: object
>>>
Answer:
import pandas as pd s = pd.Series({'abc':[1,2,3],'bcd': [2,2,6],'cxv':[3,5,4]}) s1=pd.Series([1,2,3]) print (s)
Question 28.
Write MySQL statements for the following:
(i) To create a database named ABCPUBLICSCHOOL.
(ii) To create a table named STUDENT based on the following specification:
Column Name | Data Type | Constraints |
ADM_NO | Integer | Primary Key |
SNAME | Varchar(20) | NOT NULL |
Answer:
(i) CREATE DATABASE ABC_PUBLIC_SCHOOL;
(ii) CREATE TABLE STUDENT (ADM_NO INTEGER PRIMARY KEY, SNAME VARCHAR(20) NOT NULL);
Question 29.
Anita, a student of class 12 had opened a Facebook account newly. She received Friend request from a group of class 12 girls from another school. After some time, she starts getting negative comments on her posts. She also finds that her pictures are being shared online without her permission. Based on the given information, answer the questions given below.
(i) Identify the type of cybercrime she is a victim of.
(ii) Under which act, she can lodge a complaint to the relevant authorities?
(iii) Suggest her any two precautionary measures which she should take in Future while being online to avoid any such situations.
OR
How can we prevent hazards at home or school?
Answer:
(i) She is a victim of Cyber Bullying.
(ii) Information Technology Act, 2000 (also known as IT Act).
(iii) a. Need to be careful while befriending unknown people on theinternet. b. Keep personal information private.
OR
In order to reduce the risk of accidents, take these precautions:
- Provide active adult supervision.
- Use appropriate playground surfaces.
- Install age-appropriate equipment.
- Increase equipment safety.
- Conduct regular safety checks.
- Teach students playground safety.
- Consider an alternate playground.
Question 30.
Consider the given DataFrame ‘df’:
Write suitable Python statements for the following:
(i) Add a column called bio with the following data:
[70,56,89,80],
(ii) Add a new column total and calculate the total of all subjects.
(iii) Add a new column avg and calculate the average of all subjects.
Answer:
import pandas as pd df3=pd.DataFrame([[78,79, 80], [49, 72, 75], [80, 42,78], [53, 71, 40]],index= [ ' studentl' , ' student-2 ' , ' student3 ' , ' st udent4-],columns=print(df3) df3['bio']=pd.Series([70,56,89,80], index=[1studentl', 'student2', 'student3', 'student4']) (i) print(df3) df3 ['total']=df3['ip']+df3['eng']+df3 ['math']+df3['bio'] (ii) print(df3) df3 ['avg'] = (df3['ip']+df3['eng']+df3 ['math']+df3['bio'])/4 (iii) print(df3) OUTPUT:
Section D
Question 31.
Consider the following table and answer the given questions
(i) Write a query to display the year of Newest Book.
(ii) Write a query to display the Day of most recent Book.
(iii) Write a query to display all the transactions done in the month of June.
(iv) Write a query to count total number of transactions in the year after 1999.
Answer:
(i) SELECT YEAR (MAX (DOP) ) FROM Library;
(ii) SELECT DAY (MAX ( DOP) ) FROM Library;
(iii) SELECT * FROM Library WHERE MONTH(DOP)=’06’;
(iv) SELECT COUNT (ID) FROM Library WHERE YEAR(DOP)>1999;
Question 32.
Ayus, a Data Analyst with a multinational brand has designed the DataFrame Df3.
Answer the following questions:
(i) Predict the output of the following python statement:
a. print(df3.loc[0:1, :2:2]}
b. print(df3.iloc[0:1,])
(ii) Delete the last column from the DataFrame.
(iii) Write Python statement to add a new column total which is the sum of all the 3 values.
OR (Option for part iii only)
Write Python statement to export the DataFrame to a CSV file named book.csv stored at F: drive.
Answer:
(i)
(i) df3.pop(2)
(ii) df3[‘total’]=df3[0]+df3[1]+df3[2]
Section E
Question 33.
Write suitable SQL queries for the following:
(i) To calculate the exponent for 2 raise to the power of 2.
(ii) To display current date& time only.
(iii) to round off the value 24.2302 to 1 decimal place.
(iv) To remove all the probable Trailing spaces from the column username of the table named user.
(v) To display the length of the string ‘CBSE @ 2024’.
Answer:
(i) SELECT POWER (2,-2) ;
(ii) SELECT NOW();
(iii) SELECT ROUND(24.2302, 1 );
(iv) SELECT RTRIM (USERNAME) FROM USER;
(v) SELECT LENGTH(“CBSE @ 2024”);
OR
Naman has created following table named exam:
Help him in writing SQL queries to the perform the following task:
(i) Insert a new record in the table having following values:
[7, ‘MONIKA’, ‘CS’, 85]
(ii) To change the value “CS” to “Comp Sc” in subject column.
(iii) To remove the records of those students whose marks are less than 90.
(iv) To add a new column ADDRESS of suitable datatype and Not Null.
(v) To display records of “Comp_Sc” subject.
Answer:
(i) INSERT INTO EXAM VALUES(7,’MONIKA’,’CS’,85);
(ii) UPDATE EXAM SET subject= ” Comp_Sc ” where subject = “CS”;
(iii) DELETE FROM EXAM WHERE marks<90;
(iv) ALTER TABLE EXAM ADD ADDRESS varchar(25) Not Null; ,
(v) Select * from exam where subject=” Comp_Sc “;
Question 34.
XYZ is professional consultancy company. The company is planning to set up their new offices in India with its hub at Pune. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (v) below:
Physical locations of the blocks
Block to Block distance (in Metres):
From | To | Distance |
Human Resource | Conference | 110 |
Human Resource | Finance | 4o |
Conference | Finance | 80 |
Expected number of computers to be installed in each block:
Block | Computers |
Human Resource | 25 |
Finance | 120 |
Conference | 90 |
(i) What will be the most appropriate block, where XYZ should plan to install their server?
(ii) Draw a block diagram showing cable layout to connect all the buildings in the most appropriate manner for efficient communication.
(iii) What will be the best possible connectivity out of the following you will suggest to connect the new setup of offices in Chennai with its London based office.
1. Satellite link
2. Infrared
3. Ethernet cable
(iv) Which of the following device will be suggested by you to connect each computer in each of the buildings?
1. Switch
2. Modem
3.Gateway
(v) Which type of network out of the following is formed by connecting the computers of these three blocks?
1. LAN
2. MAN
3. WAN
Answer:
(i) Finance block because it has maximum number of computers.
(ii)
(iii) Satellite link
(iv) Switch
(v) LAN
Question 35.
The price of 10 Items are given below:
Price_item= [10, 12, 12.5,13,13,15,50,22,21,56,38]
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 as pit Price_item=[10,12,12.5,13,13,15,50,22,21,56,38] plt.hist(Price_item) 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 ‘Book_Info’ Bar Chart as shown below:
Also give suitable python statement to save this chart.
Answer:
import matplotlib.pyplot as plt BOOK = ('ART&CRAFT' , 'Music', 'YOGA', 'FOOT BALL') Rating = [5,7,10,9] plt.bar(BOOK, Rating,color=["m","y","b", "r"]) plt.title ("Book_Info") plt.ylabel("Rating") plt.xlabel("Book") plt.show ( ) plt.savefig("book.jpg")