CBSE Class 12 Informatics Practices Sample paper solution 2023 | Answer key Class 12 Informatics Practices Sample paper 2023

CBSE Class 12 Informatics Practices Sample paper solution 2023

CBSE Class 12 Informatics Practices Sample paper solution 2023 | Answer key Class 12 Informatics Practices Sample paper 2023

SAMPLE QUESTION PAPER

CLASS XII

INFORMATICS PRACTICES

(065)

General Instructions:

  1. This question paper contains five sections, Section A to
  2. All questions are
  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
  6. Section D has 03 Long Answer type questions carrying 05 marks
  7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35 against part c
  8. All programming questions are to be answered using Python Language

 PART A

1. Television cable network is an example of:     
i. LAN
ii. WAN
ii. MAN
iv. Internet

Ans:
iii. MAN

2. Which of the following is not a type of cyber crime? 1

  1. Data theft
  2. Installing antivirus for protection
  3. Forgery
  4. Cyber bullying

Ans:
ii. Installing antivirus for protection

3. What is an example of e-waste? 1

  1. A ripened mango
  2. Unused old shoes
  3. Unused old computers
  4. Empty cola cans

Ans:
iii. Unused old computers

4. Which type of values will not be considered by SQL while executing the following statement?             1
SELECT COUNT(column name) FROM inventory;

  1. Numeric value
  2. Text value
  3. Null value
  4. Date value

Ans:
iii Null value

5. If column “Fees” contains the data set (5000,8000,7500,5000,8000), what will be the output after the execution of the given query?
SELECT SUM (DISTINCT Fees) FROM student;           1

  1. 20500
  2. 10000
  3. 20000
  4. 33500

Ans:
i. 20500

6. ‘O’ in FOSS stands for: 1

  1. Outsource
  2. Open
  3. Original
  4. Outstanding

Ans:
ii. Open

7. Which SQL statement do we use to find out the total number of records present in the table ORDERS?     1

  1. SELECT * FROM ORDERS;
  2. SELECT COUNT (*) FROM ORDERS;
  3. SELECT FIND (*) FROM ORDERS;
  4. SELECT SUM () FROM ORDERS; 

Ans:
ii. SELECT COUNT (*) FROM ORDERS;

8. Which one of the following is not an aggregate function?   1

  1. ROUND( )
  2. SUM( )
  3. COUNT( )
  4. AVG( )

Ans:
i. ROUND( )

9. Which one of the following functions is used to find the largest value from the given data in MySQL? 1

  1. MAX( )
  2. MAXIMUM( )
  3. BIG( )
  4. LARGE( )

Ans:
i. MAX( )

10. To display last five rows of a series object ‘S’, you may write: 5

  1. Head()
  2. Tail(5)
  3. Head(5)
  4. tail()

Ans:
S.Tail(5)

11. Which of the following statement will import pandas library?   1

  1. Import pandas as pd
  2. import Pandas as py
  3. import pandas as pd
  4. import panda as pd 1

Ans:
iii. import pandas as pd

12. Which of the following can be used to specify the data while creating a DataFrame? 1

  1. Series
  2. List of Dictionaries
  3. Structured ndarray
  4. All of these

Ans:
iv. All of these

13, Which amongst the following is not an example of a browser? 1

  1. Chrome
  2. Firefox
  3. Avast
  4. Edge

Ans:
iii.Avast

14. In SQL, which function is used to display current date and time?  1

  1. Date ()
  2. Time ()
  3. Current ()
  4. Now ()

Ans:
iv. Now()

15. Legal term to describe the rights of a creator of original creative or artistic work is:   1

  1. Copyright
  2. Copyleft
  3. GPL
  4. FOSS

Ans:
i. Copyright

16.  _________ is the trail of data we leave behind when we visit any website (or use any online application or portal) to fill-in data or perform any transaction.            1

  1. Offline phishing
  2. Offline footprint
  3. Digital footprint
  4. Digital phishing

Ans:
iii. Digital footprint

Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as

  1. Both A and R are true and R is the correct explanation for A
  2. Both A and R are true and R is not the correct explanation for A
  3. A is True but R is False
  4. A is false but R is True

17. Assertion (A): – Internet cookies are text files that contain small pieces of data, like a username, password and user’s preferences while surfing the internet.
Reasoning (R):- To make browsing the Internet faster & easier, its required to         store certain information on the server’s computer.            1
Ans:
iii. A is True but R is False

18. Assertion (A):- DataFrame has both a row and column index.
Reasoning (R): – A DataFrame is a two-dimensional labelled data structure like   a table of MySQL.     1
Ans:
i. Both A and R are true and R is the correct explanation for A



PART B

19. Explain the terms Web page and Home Page. 2
Ans:
Web Page: Web Page is a hypertext based document created by using HTML. It can also be defined as component of website.
Home Page: It is the very first web page that opens up we open a website.
OR
Mention any four networking goals.                                                                                  
Ans:

  1. Sharing of Resources
  2. Reduction in cost
  3. Communication
  4. Reliability

20. Rashmi, a database administrator needs to display house wise total number of records of ‘Red’ and ‘Yellow’ house. She is encountering an error while executing the following query:
SELECT HOUSE, COUNT (*) FROM STUDENT GROUP BY HOUSE  WHERE HOUSE=’RED’ OR HOUSE= ‘YELLOW’;
Help her in identifying the reason of the error and write the correct query by suggesting the possible correction (s).  2.
Ans:
We need to write having clause in spite of where clause in SQL query.
Correction:
SELECT HOUSE, COUNT(*) FROM STUDENT GROUP BY HOUSE HAVING HOUSE= ‘RED’ OR HOUSE=’YELLOW’;
 

21. What is the purpose of Order By clause in SQL? Explain with the help of suitable example.    2
Ans:
ORDER BY clause is used to sort the result of SQL select query in ascending or descending order.
Example:
SELECT * FROM students ORDER BY rollno;
This command will display all records of students table in ascending order of rollno field.

22. Write a program to create a series object using a dictionary that stores the number of students in each house of class 12D of your school.   2
Note: Assume four house names are Beas, Chenab, Ravi and Satluj having 18, 2, 20, 18 students respectively and pandas library has been imported as pd.
Ans:
St={‘Beas’ :18, ‘Chenab’ :20 , ‘ Ravi’ :20, ‘ Satluj’ :18}
S1=pd.Series(St)

23. List any four benefits of e-waste management.     2
Ans:

  1. Recovery of precious metals.
  2. To saves the environment.
  3. To protect water quality.
  4. To saves landfill space.

OR
Mention any four net etiquettes.        2
Ans:

  1. Respect the privacy of others.
  2. Don’t give personal information.
  3. iii. Don’t violate copyright content.
  4. Don’t use abusive language.

24. What will be the output of the following code:     2
>>>import pandas as pd
>>>A=pd.Series(data=[35,45,55,40])
>>>print(A>45)                                                                                                                          2
Ans:
0          False
1          False
2          True
3          False

25. Carefully observe the following code:   2
import pandas as pd
Year1={‘Q1′:5000,’Q2′:8000,’Q3′:12000,’Q4’: 18000}
Year2={‘A’ :13000,’B’:14000,’C’:12000}
totSales={1:Year1,2:Year2} df=pd.DataFrame(totSales)
print(df)
Answer the following:
i. List the index of the DataFrame df
Ans:
Q1,Q2,Q3,Q4,A,B,C

ii. List the column names of DataFrame df. 
Ans:
1,2



SECTION C

26. Write outputs for SQL queries (i) to (iii) which are based on the given table PURCHASE: 3

CBSE Class 12 Informatics Practices Sample paper solution 2023

i. SELECT LENGTH(CNAME) FROM PURCHASE WHERE QUANTITY>100;
Ans:
8
 

ii.SELECT CNAME FROM PURCHASE WHERE MONTH(DOP)=3;
Ans:
No Record Found
 
iii. SELECT MOD (QUANTITY, DAY(DOP)) FROM PURCHASE WHERE CITY= ‘CHANDIGARH’;          
Ans:
0
15

27. Write a Python code to create a DataFrame with appropriate column headings from the list given below:
[[101,’Gurman’,98],[102,’Rajveer’,95],[103,’Samar’ ,96],[104,’Yuvraj’,88]]                3
Ans:
import pandas as pd
data=[[101,’Gurman’,98],[102,’Rajveer’,95],[103,’Samar’ ,96], [104,’Yuvraj’,88]]
df=pd.DataFrame(data,columns=[‘Rno’,’Name’, ‘Marks’])

28. Consider the given DataFrame ‘Stock’:     3

CBSE Class 12 Informatics Practices Sample paper solution 2023

Write suitable Python statements for the following:     3

i. Add a column called Special_Price with the following data:
[135,150,200,440].
Ans:
Stock[‘Special_Price’]=[135,150,200,400]

ii. Add a new book named ‘The Secret’ having price 800.
Ans:
Stock.loc[‘4’]=[‘The Secret’,800]
 
iii. Remove the column Special_Price.                                                                                
Ans:
Stock=Stock.drop(‘Special_Price’,axis=1)

29. Nadar has recently shifted to a new city and school. She does not know many people in her new city and school. But all of a sudden, someone is posting negative, demeaning comments on her social networking profile etc.
She is also getting repeated mails from unknown people. Every time she goes online, she finds someone chasing her online.              3

 i. What is this happening to Nadar?
Ans:                    
She has become a victim of Cyber Stalking and Cyber Bullying.

ii. What immediate action should she take to handle it?

Ans:
She must bring it into the notice of her parents and school authorities. She should report this cyber-crime to local police with the help of her parents.

iii. Is there any law in India to handle such issues? Discuss briefly.                              
Ans:
Yes. IT ACT 2000 (The Information Technology Act, 2000) is main law in India to deal with cybercrimes.

OR

What do you understand by plagiarism? Why is it a punishable offence? Mention  any two ways to avoid plagiarism.                                                                                                                
Ans.
Plagiarism is the act of stealing someone else’s intellectual work posing it as your own work. It is a punishable offence because It is a fraud and violation of Intellectual Property Rights.
Two ways to avoid plagiarism are

  • Be original.
  • Acknowledge the source.

30. Based on table STUDENT given here, write suitable SQL queries for the following:   3

CBSE Class 12 Informatics Practices Sample paper solution 2023

i.Display gender wise highest
Ans:
Select max(marks) from student group by gender;
 

ii. Display city wise lowest
Ans:
Select min(marks) from student group by city;
 

iii. Display total number of male and female
Ans:
select gender,count(gender) from student group by gender;

OR

Discuss the significance of Group by clause in detail with the help of suitable example.    3
Group By clause can be used with select statement. to group records based on distinct values in  specified columns i.e. it creates a data set containing several sets of records grouped together based on a condition. We can specify the condition for which records should be grouped by using “having” clause.
Examples:
a. Select class, sum(fees) from student group by job ;
This command will show the classes along with sum of fees corresponding to various classes  in the table student.
b. Select class, sum(fees) from student group by job  having count(class)>3;
This command will show the classes along with sum of fees corresponding to various classes where number of records corresponding to a particular class are more than 3.


SECTION D

31. Write suitable SQL query for the following:       5
i. Display 7 characters extracted from 7th left character onwards from the string ‘INDIA SHINING’.
Ans:
select mid(‘INDIA SHINING’,7,7);

ii. Display the position of occurrence of string ‘COME’ in the string ‘WELCOME WORLD’.
Ans:
select INSTR(‘WELCOME WORLD’,’COME’);

iii. Round off the value 23.78 to one decimal place.
Ans:
select round(23.78,1);

iv. Display the remainder of 100 divided by 9.
Ans:
select mod(100,9); v. select trim(userid) from users;
 

v. Remove all the expected leading and trailing spaces from a column userid of the table ‘USERS’.
Ans:
select trim(userid) from users;

OR

Explain the following SQL functions using suitable examples.     5

i. UCASE()
Ans:
It converts the string into upper case.
Example:
SELECT UCASE(‘cbse’);
Output
CBSE

ii. TRIM()
Ans:
It removes the leading and trailing spaces from a string value.
Example:
SELECT TRIM(‘   CBSE   ‘ );
Output:
CBSE

iii. MID()
Ans:
It fetches specific characters from a string value depending upon the index and length.
Example:
SELECT MID(‘CBSE,2,,2);
Output:
BS

iv. DAYNAME()
Ans:
It returns name of day from a given date value.
Example:
SELECT DAYNAME(‘2022-09-22’);
Output:
Thursday

v. POWER()
Ans:
It returns the value from a  number raised to the power another number.
Example:
SELECT POW(3,2);
Output:
9

32. Prime Computer services Ltd. is an international educational organization. It is planning to set up its India campus at Mumbai with its head office in Delhi. The Mumbai office campus has four main buildings-ADMIN, ACCOUNTS, EXAMINATION and RESULT. 

You as a network expert have to suggest the best network related solutions for their problems raised in (i) to (v), keeping in mind the distances between the buildings and other given parameters.      5

CBSE Class 12 Informatics Practices Sample paper solution 2023

(i) Suggest the most appropriate location of the server inside the MUMBAI campus (out of the four buildings) to get the best connectivity for maximum number of computers. Justify your answer
Ans:
Server should be installed in Admin department as it has maximum number of computers.

(ii) Suggest and draw cable layout to efficiently connect various buildings within the MUMBAI campus for a wired connectivity.
Ans
CBSE Class 12 Informatics Practices Sample paper solution 2023

(iii) Which networking device will you suggest to be procured by the company to interconnect all the computers of various buildings of MUMBAI campus?
Ans:
Hub/Switch

(iv) Company is planning to get its website designed which will allow students to see their results after registering themselves on its server. Out of the static or dynamic, which type of website will you suggest?
Ans:
Dynamic

(v) Which of the following will you suggest to establish the online face to face communication between the people in the ADMIN office of Mumbai campus and Delhi head office?

  1. Cable TV
  2. Email
  3. Video conferencing
  4. Text chat

Ans:
Video conferencing

33. Write Python code to plot a bar chart for India’s medal tally as shown below:   5

CBSE Class 12 Informatics Practices Sample paper solution 2023
Ans:
import matplotlib.pyplot as plt
MedalType=[‘Gold’,’Silver’,’Bronze’]
Medal=[20,15,18]
plt.bar(MedalType,Medal)
plt.ylabel(‘Medal’)
plt.xlabel(‘Medal Type’)
plt.title(‘Indian Medal Tally’)
plt.show()
Also give suitable python statement to save this chart.
Ans:
plt.savefig(“aa.jpg”)

OR

Write a python program to plot a line chart based on the given data to depict the changing weekly average temperature in Delhi for four weeks.
Ans:
import matplotlib.pyplot as plt
Weeks=[1,2,3,4]
AvgTemp=[44,42,39,43]
plt.plot(Weeks,AvgTemp)
plt.show() 
 

SECTION E

34. Shreya, a database administrator has designed a database for a clothing shop.      
Help her by writing answers of the following questions based on the given table:  1+1+2

CBSE Class 12 Informatics Practices Sample paper solution 2023
i Write a query to display cloth names in lower case.
Ans:
SELECT LOWER(CNAME) FROM CLOTH;

ii. Write a query to display the lowest price of the cloths.
Ans:
SELECT MIN(PRICE) FROM CLOTH;

iii. Write a query to count total number of cloths purchased of medium size.
Ans:
SELECT COUNT(*) FROM CLOTH GROUP BY SIZE HAVING SIZE=’M’;
 
OR (Option for part iii only)
 
Write a query to count year wise total number of cloths purchased.                            
Ans:
SELECT YEAR(DOP),COUNT(*) FROM CLOTH GROUP BY YEAR(DOP);

35. Mr. Som, a data analyst has designed the DataFrame df that contains data about Computer Olympiad with ‘CO1’, ‘CO2’, ‘CO3’, ‘CO4’, ‘CO5’ as indexes shown below. Answer the following questions:   1+1+2

CBSE Class 12 Informatics Practices Sample paper solution 2023

Predict the output of the following python statement:

i. df.shape
Ans:
(5,4)

ii. df[2:4]
Ans:

School     Tot_students           Topper            First_Runnerup
CO3                   GPS                20                    18                                2
CO4                   MPS               18                    10                                8

Write Python statement to display the data of Topper column of indexes CO2 to CO4.
Ans:
print(df.loc[‘CO2’: ‘CO4’, ‘Topper’])
 
OR (Option for part iii only)

Write Python statement to compute and display the difference of data of Tot_students column and First_Runnerup column of the above given DataFrame.
Ans;
print(df.Tot_students-df.First_Runnerup)
 
 

Related Links

Class X Sample Papers

Class XI Sample Papers

 

Spread the love
Lesson tags: Answer key Class 12 Informatics Practices Sample paper 2023, CBSE Class 12 Informatics Practices Sample paper solution 2023
Back to: Question Papers & Quizzes
Spread the love