Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 1 are designed as per the revised syllabus.

CBSE Sample Papers for Class 12 Informatics Practices Set 1 with Solutions

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions:

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

Section – A

Multiple Choice Questions

Question 1.
Television cable network is an example of:
(A) LAN
(B) WAN
(C) MAN
(D) Internet [1]
Answer:
(C) MAN
Explanation: A television cable network is an example of MAN. A metropolitan area network (MAN) is a computer network that connects computers within a metropolitan area, which could be a single large city, multiple cities, and towns, or any given large area with multiple buildings. [1]

CBSE Sample Papers for Class 12 Informatics Practices Set 1 with Solutions

Question 2.
Which of the following is not a type of cyber crime?
(A) Data theft
(B) Installing antivirus for protection
(C) Forgery
(D) Cyber bullying [1]
Answer:
(B) Installing antivirus for protection
Explanation: Cybercrime is a crime that involves a computer and a network. The computer may have been used in the commission of a crime, or it may be the target. Installing antivirus for protection is not a cybercrime. [1]

Question 3.
What is an example of e-waste?
(A) A ripened mango
(B) Unused old shoes
(C) Unused old computers
(D) Empty cola cans [1]
Answer:
(C) Unused old computers
Explanation: E-waste is a popular, informal name for electronic products nearing the end of their “useful life.” Computers, televisions, VCRs, stereos, copiers, and fax machines are common electronic products. [1]

Question 4.
Which type of values will not be considered by SQL while executing the following statement? SELECT COUNT(column name) FROM inventory;
(A) Numeric value
(B) text value
(C) Null value
(D) Date value [1]
Answer:
(C) Null value
Explanation: The COUNT( ) function returns the number of records returned by a select query. Note: NULL values are not counted. Syntax COUNT(expression). [1]

Question 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;
(A) 20500
(B) 10000
(C) 20000
(D) 33500 [1]
Answer:
(A) 20500
Explanation: sum() function is used to return the total summed value of an expression. DISTINCT statement is used to return only distinct (different) values. [1]

Question 6.
‘O’ in FOSS stands for:
(A) Outsource
(B) Open
(C) Original
(D) Outstanding [1]
Answer:
(B) Open
Explanation: Free and open-source software (FOSS) allows users and programmers to edit, modify or reuse the software’s source code. This gives developers the opportunity to improve program functionality by modifying it. [1]

Question 7.
Which SQL statement do we use to find out the total number of records present in the table ORDERS?
(A) SELECT * FROM ORDERS;
(B) SELECT COUNT(*) FROM ORDERS;
(C) SELECT FIND (*) FROM ORDERS;
(D) SELECT SUM ( ) FROM ORDERS; [1]
Answer:
(B) SELECT COUNT(*) FROM ORDERS;
Explanation: The COUNT( ) function returns the number of records returned by a select query. Note: NULL values are not counted. [1]

Question 8.
Which one of the following is not an aggregate function?
(A) ROUND( )
(B) SUM( )
(C) COUNT( )
(D) AVG( ) [1]
Answer:
(A) ROUND( )
Explanation: An aggregate function in SQL performs a calculation on multiple values and returns a single value. SQL provides many aggregate functions that include avg, count, sum, min, max, etc. ROUND( ) is mathematical function. [1]

Question 9.
Which one of the following functions is used to find the largest value from the given data in MySQL?
(A) MAX ( )
(B) MAXIMUM ( )
(C) BIG( )
(D) LARGE ( ) [1]
Answer:
(A) MAX ( )
Explanation: MAX function is used to return the maximum value of an expression in a SELECT statement.
Syntax
SELECT MAX(aggregate_expression)
FROM tables
(WHERE conditions); [1]

Question 10.
To display last five rows of a series object ‘S’, you may write:
(A) S.Head( )
(B) S.Tail(5)
(C) S.Head(5)
(D) S.tail( ) [1]
Answer:
(D) S.tail( )
Explanation: tail( ) function in Python displays the last five rows of the dataframe by default. It takes in a single parameter: the number of rows. We can use this parameter to display the number of rows of our choice. [1]

Question 11.
Which of the following statement will import pandas library?
(A) Import pandas as pd
(B) import Pandas as py
(C) import pandas as pd
(D) import panda as pd [1]
Answer:
(C) import pandas as pd
Explanation: Pandas is a popular Python-based data analysis toolkit which can be imported using import pandas as pd.

CBSE Sample Papers for Class 12 Informatics Practices Set 1 with Solutions

Question 12.
Which of the following can be used to specify the data while creating a DataFrame?
(A) Series
(B) List of Dictionaries
(C) Structured ndarray
(D) All of these [1]
Answer:
(D) All of these
Explanation: Pandas DataFrame is a 2-dimensional labeled data structure like any table with rows and columns. Series, List of Dictionaries and Structured ndarray can be used to specify the data while creating a DataFrame. [1]

Question 13.
Which amongst the following is not an example of a browser?
(A) Chrome
(B) Firefox
(C) Avast
(D) Edge [1]
Answer:
(C) Avast
Explanation: A web browser is a type of software that allows you to find and view websites on the Internet. Chrome, Firefox and Edge are examples of Web browser. Avast is an example of antivirus. [1]

Question 14.
In SQL, which function is used to display current date and time?
(A) Date ( )
(B) Time ( )
(C) Current ( )
(D) Now ( ) [1]
Answer:
(D) Now ( )
Explanation: The NOW() function returns the current date and time. Note: The date and time is returned as “YYYY-MM-DD HH-MM-SS” (string) or as YYYYMMDDHHMMSS. uuuuuu (numeric). [1]

Question 15.
Legal term to describe the rights of a creator of original creative or artistic work is:
(A) Copyright
(B) Copyleft
(C) GPL
(D) FOSS [1]
Answer:
(A) Copyright
Explanation: Copyright (or author’s right) is a legal term used to describe the rights that creators have over their literary and artistic works. Works covered by copyright range from books, music, paintings, sculpture, and films, to computer programs, databases, advertisements, maps, and technical drawings. [1]

Question 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.
(A) Offline phishing
(B) Offline footprint
(C) Digital footprint
(D) Digital phishing [1]
Answer:
(C) Digital footprint
Explanation: Digital footprint is the trail of data we leave behind when we visit any website to fill-in data or perform any transaction. A digital footprint, sometimes called a digital dossier. Digital footprints are sometimes broken down into active and passive data traces. [1]

Assertion & Reason

Directions: 17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(A) Both (A) and (R) are true and (R) is the correct explanation (A)
(B) Both (A) and (R) are true and R is not the correct explanation (A)
(C) (A) is True but (R) is False
(D)(A) is false but (R) is True
Answer:
(C) (A) is True but (R) is False
Explanation: Digital footprint is the trail of data we leave behind when we visit any website to fill-in data or perform any transaction. A digital footprint, sometimes called a digital dossier. Digital footprints are sometimes broken down into active and passive data traces. [1]

Question 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]
Answer:
(C) (A) is True but (R) is False
Explanation: Managing your open tabs more efficiently will also help you browse faster. [1]

Question 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]
Answer:
(A) Both (A) and (R) are true and (R) is the correct explanation (A)
Explanation: Indexing in Pandas means selecting 1 False rows and columns of data from a Dataframe. It can 2 True be selecting all the rows and the particular number of columns, a particular number of rows, and all the columns or a particular number of rows and columns each.

Section – B

Question 19.
Explain the terms Web page and Home Page.
OR
Mention any four networking goals [2]
Answer:
Web Page: A Web Page is a part of a website and is commonly written in HTML. It can be accessed through a webbrowser. [2]
Home Page: It is the first web page you see when you visit a website. [1] [1 mark for correct explanation of each term]
OR
Four networking goals are:

  1. Resource sharing
  2. Reliability
  3. Costeffective
  4. Fast data sharing [1/2 mark for each goal]

Question 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).
Answer:
The problem with the given SQL query is that WHERE clause should not be used with Group By clause.
To correct the error, HAVING clause should be used instead of WHERE. Corrected Query:
SELECT HOUSE, COUNT(*) FROM STUDENT GROUP BY HOUSE HAVING HOUSE = ‘RED’ OR HOUSE =’ YELLOW’; [2]
[1 Mark for error identification]
[1 Mark for writing correct query}

Question 21.
What is the purpose of Order By clause in SQL? Explain with the help of suitable example.
Answer:
Order By clause:
The ORDER BY command is used to sort the result set in ascending or descending order. The following SQL statement displays all the customer’s names in alphabetical order: SELECT Cname FROM Customers ORDER BY mark for correct purpose] [1 mark for correct example]

Question 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. 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. [2]
Answer:
St = {‘Beas’ : 18 , ‘Chenab’ : 20 , ‘Ravi’ :20, ‘Satluj’ :18}
S1=pd.Series(St) [1 mark for cach correct python statement]

Question 23.
List any four benefits of e-waste management.
OR
Mention any four net etiquettes. [2]
Answer:
The e-waste management-

  1. Saves the environment and natural resources
  2. Allows for recovery of precious metals
  3. Protects public health and water quality
  4. Saves landfills pace [2] [1/2 mark for each benefit]
    OR
  5. No copyright violation
  6. Share the expertise with others on the internet
  7. Avoid cyber bullying
  8. Respect other’s privacy and diversity [1/2 mark for each net etiquette]

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

Question 25.
Carefully observe the following code:
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
(ii) List the column names of DataFrame df.
Answer:

  1. The index labels of df will include Q1, Q2, Q3, Q4, A, B,C
  2. The column names of df will be:1,2 [2] [1 mark for each correct answer]

Section – C

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

CNO CNAME CITY QUANTITY DOP
C01 GURPREET NEW DELHI 150 2022-06-11
C02 MALIKA HYDERABAD 10 2022-02-19
C03 NADAR DALHOUSIE 100 2021-12-04
C04 SAHIB CHANDIGARH 50 2021-10-10
C05 MEHAK CHANDIGARH 15 2021-10-20

(i) SELECT LENGTH(CNAME) FROM PURCHASE WHERE QUANTITY>100;
(ii) SELECT CNAME FROM PURCHASE WHERE MONTH(DOP)=3;
(iii) SELECT MOD (QUANTITY, DAY(DOP)) FROM PURCHASE WHERE CITY= ‘CHANDIGARH’; [3]
Answer:

  1. 8
  2. No Output
  3. 0
    15 [3] [1 mark for each correct output]

CBSE Sample Papers for Class 12 Informatics Practices Set 1 with Solutions

Question 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]
Answer:
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’])
[1 mark for each correct python statement]

28. Consider the given DataFrame ‘Stock:

Name Price
0. Nancy Drew 150
1. Hardy boys 180
2. Diary of a wimpy kid 225
3. Harry Potter 500

Write suitable Python statements for the following:

(i) Add a column called Special Price with the following data: [135,150,200,440).
(ii) Add a new book named ‘The Secret having price 800.
(iii) Remove the column Special_Price. [3]
Answer:

  1. Stock[‘Special_Price’]=[135,150,200,400]
  2. Stock.loc[‘4’]=[‘TheSecret’,800]
  3. Stock=Stock.drop(‘Special_Price’, axis=1) [3]
    [1 mark for each correct statement]

Question 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.

(i) What is this happening to Nadar?
(ii) What immediate action should she take to handle it?
(iii) Is there any law in India to handle such issues? Discuss briefly.
OR
What do you understand by plagiarism? Why is it a punishable offence? Mention any two ways to avoid plagiarism.
Answer:

  • Nadar has become a victim of cyber bullying and cybers talking.
  • She must immediately bring it into the notice of her parentsand school authorities. And she must report this cyber crime to local police with the help of her parents.
  • Yes.

The Information Technology Act, 2000 (also known as ITA-2000, or the IT Act) is the primary law in India dealing with cybercrime and electronic commerce. [3]
[1 mark for each correct answer]
OR
Plagiarism is the act of using or stealing some one else’s in work, ideas etc. and passing it as your own work. In other words, plagiarism is a failure in giving credit to its source.
Plagiarism is a fraud and violation of Intellectual Property Rights. Since IPR holds a legal entity status, violating its owners right is a legally punishable offence.
Any two ways to avoid plagiarism:
– Be original
– Cite/acknowledge the source [3]
[1 mark for correct definition]
[1 mark for correct justification]
[1/2 mark each for any two ways to avoid plagiarism]

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

Roll No Name Class Gender City Marks
1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himnashu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429

(i) Display gender wise highest marks.
(ii) Display city wise lowest marks.
(iii) Display total number of male and female students.
OR
Discuss the significance of Group by clause in detail with the help of suitable example. [3]
Answer:

  1. select max(marks) from student group by gender;
  2. select min(marks) from student group by city;
  3. select gender,count(gender) from student group by gender; [3]
    [1 mark for each correct query]

OR
GROUP BY clause is used in a SELECT statement in combination with aggregate functions to group the result based on distinct values in a column.
For example:
To display total number of male and female students from the table STUDENT, we need to first group records based on the gender then we should count records with the help of count( ) function.
Considering the following table STUDENT:

RollNo Name Class Gender City Marks
1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himnashu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429

SQLL query for the above-mentioned task is as follows:
select gender, count(gender) from student group by gender;
Table
[1 mark for correct significance] [2 marks for correct example]

Section – D

Question 31.
Write suitable SQL query for the following:
(i) Display 7 characters extracted from 7th left character onwards from the string ‘INDIA SHINING’.
(ii) Display the position of occurrence of string ‘COME’ in the string ‘WELCOME WORLD’.
(iii) Round off the value 23.78 to one decimal place.
(iv) Display the remainder of 100 divided by 9.
(v) Remove all the expected leading and trailing spaces from a column userid of the table ‘USERS’.
OR
Explain the following SQL functions using suitable examples.
(i) UCASE( )
(ii) TRIM ( )
(iii) MID ( )
(iv) DAYNAME ( )
(v) POWER( )
Answer:

  1. select mid(‘INDIA SHINING 7,7);
  2. select INSTR(‘WELCOME WORLD’, ‘COME’);
  3. select round (23.78,1);
  4. select \bmod (100,9);
  5. select trim(userid) from users; [5]
    [1 mark for each correct query]

OR
1. UCASE( ): It converts the string into uppercase.
Example:
SELECT UCASE(‘welcome world’);
Output:
WELCOME WORLD

2. TRIM( ): It removes the leading and trailing spaces from the given string.
Example:
SELECT TRIM(‘ Welcome world ‘);
Output:
Welcome world

3. MID( ): It extracts the specified number of characters from given string.
Example:
SELECT MID(‘ Welcome world,4,4);
Output:
Come

4. DAYNAME( ): It returns the weekday name for a given date
Example:
SELECT DAYNAME(‘2022-07-22);
Output:
Friday

5. POWER( ): It returns the value of a number raised to the power of another number.
Example:
SELECT POW(6,2);
Output:
36[1/2 mark for each correct explanation]
[1/2 mark for each correct example]

Question 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.
CBSE Sample Papers for Class 12 Informatics Practices Set 1 Img 1
Shortest distances between various buildings:

ADMIN TO ACCOUNTS 55 m
ADMIN TO EXAMINATION 90 m
ADMIN TO RESULT 50 m
ACCOUNTS TO EXAMINATION 55 m
ACCOUNTS TO RESULT 50 m
EXAMINATION TO RESULT 45 m
DELHI Head Office to MUMBAI campus 2150 m

Number of computers installed at various buildings are as follows:

ADMIN 110
ACCOUNTS 75
EXAMINATION 40
RESULT 12
DELHI HEAD OFFICE 20

(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.

(ii) Suggest and draw cable layout to efficiently connect various buildings within the MUMBAI campus for a wired connectivity.

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

(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?

(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 headoffice?
(a) Cable TV
(b) Email
(c) Video conferencing
(d) Text chat
Answer:

  1. Server should be installed in Admin department as it has maximum number of computers.
  2. CBSE Sample Papers for Class 12 Informatics Practices Set 1 Img 3
  3. Hub/ Switch
  4. Dynamic
  5. Video conferencing
    [5]
    [1 mark for each correct answer]

CBSE Sample Papers for Class 12 Informatics Practices Set 1 with Solutions

Question 33.
Write Python code to plot a bar chart for India’s medal tally as shown below: [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 1 Img 2
Also give suitable python statement to save this chart.
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. Week=[1,2,3,4]
Avg_week_temp=[40,42,38,44]
Answer:
import matplotlib.pyplot as plt
Category =[‘Gold’, ‘Silver’, ‘Bronze’]
Medal=[20,15,18]
plt.bar(Category,Medal)
plt.ylabel(‘Medal’)
plt.xlabel(‘Medal Type’)
plt.title(‘Indian Medal tally in Olympics’)
plt.show( ) [5]
[1/2 mark for each correct statement]
Python statement to save the chart:
plt.savefig(“aa.jpg”)
[1 mark for the correct statement]
OR
import matplotlib.pyplot as plt
Week=[1,2,3,4]
Avg_week_temp=[40,42,38,44]
plt.plot(Week,Avg_week_temp)
plt.show ( ) [1 mark for each correct statement]

Section – E

Case based Subjective Questions

Question 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:

CCODE CNAME SIZE COLOR PRICE DOP
C001 JEANS XL BLUE 990 2022-01-21
C002 TSHIRT M RED 599 2021-12-12
C003 TROUSER M GREY 399 2021-11-10
C004 SAREE FREE GREEN 1299 2019-11-12
C005 KURTI L WHITE 399 2021-12-07

(i) Write a query to display cloth names in lowercase.
(ii) Write a query to display the lowest price of thecloths.
(iii) Write a query to count total number of cloths purchased of medium size. 1+1+2
OR (Option for part iii only)
Write a query to count year wise total number of cloths purchased.
Answer:

  1. SELECT LOWER(CNAME) FROM CLOTH;
  2. SELECT MIN(PRICE) FROM CLOTH;
  3. SELECT COUNT (*) FROM CLOTH GROUP BY SIZE HAVINGSIZE=’M’; [4]
    OR
    SELECT YEAR(DOP),COUNT(*) FROM CLOTH GROUP BY YEAR(DOP); [2 marks for correct query]

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

School Tot_students Topper First_Runnerup
CO1 PPS 40 32 8
CO2 JPS 30 18 12
CO3 GPS 20 18 2
CO4 MPS 18 10 8
CO5 BPS 28 20 8

(A) Predict the output of the following python statement:
(i) df.shape
(ii) df[2:4]
(B) Write Python statement to display the data of Topper column of indexes CO2 to CO4. 1+1+2
Write Python statement to compute and display the difference of data of Tot_students column and First_Runnerup. “column of the above given DataFrame.
Answer:
(a) output
(i) (5,4) [4]
(ii)

School tot_students Topper First_Runner_up
CO3 GPS 20 18 2
CO4 MPS 18 10 8

[1 mark for each correct output] }
(b) Python statement:
print(df.loc[‘CO2’: ‘CO4’, ‘Topper’])
OR
print(df.Tot_students-df.First_Runnerup)
[2 marks for correct Python statement]