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

Practicing the CBSE Sample Papers for Class 12 Informatics Practices Set 3 allows you to get rid of exam fear and be confident to appear for the exam.

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

Time: 3 hrs
Max. Marks: 70

General Instructions:

  1. This question paper contains five sections, Section 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 c only.
  8. All programming questions are to be answered using Python Language only.

Section – A

Question 1.
Rohit forgot his laptop in his car and when he came back, he found his laptop was missing. This act is [1]
(a) cybercrime
(b) phishing
(c) theft
(d) plagiarism
Answer:
(c) theft

Question 2.
The rights of the owner of information to decide, how much information is to be shared/exchanged/distributed, are collectively known as ____ [1]
(a) Intelligent Portable Rights
(b) Intellectual Property Rights
(c) Interactive Property Rights
(d) Instance Portability Rights
Answer:
(b) Intellectual Property Rights

Question 3.
Which of the following statement(s) is/are incorrect? [1]
(a) A column of a DataFrame can be deleted.
(b) A column of a DataFrame can be deleted, if it carries no data.
(c) A column of a DataFrame can be deleted, if it carries NaN values.
(d) Columns of DataFrame cannot be deleted.
Answer:
(d) Columns of DataFrame cannot be deleted.

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

Question 4.
Electronic discovery technique used to determine and reveal technical criminal evidence is called [1]
(a) cyber investigation
(b) cyber evidence
(c) cyber forensics
(d) cyber intrude
Answer:
(c) cyber forensics

Question 5.
The HAVING clause acts like a WHERE clause, but it identifies columns that meet a criterion, rather than rows. [1]
(a) True
(b) False
(c) Depend on query
(d) Depend on column
Answer:
(b) False

Question 6.
A series is created with 5 integers as [1]
import pandas as pd
Nseries=pd.Series([22,44,55,33,66])
print(Nseri es mbytes)
Find the output of the above code.
(a) 15
(b) 10
(c) 20
(d) 25
Answer:
(c) 20

Question 7.
The term phishing is synonymous to the term [1]
(a) spoofing
(b) spooling
(c) stalking
(d) None of these
Answer:
(a) spoofing

Question 8.
While creating a dataframe Sunil wanted to specify the datatype , which property will help him to do so? [1]
(a) datatype
(b) type
(c) dtype
(d) dt
Answer:
(c) dtype

Question 9.
What does the web server need to send back information to the user? [1]
(a) Home address
(b) Domain name
(c) IP address
(d) Both (b) and (c)
Answer:
(d) Both (b) and (c)

Question 10.
SELECT ____ (Calorie) FROM Food WHERE NOT type = “Protein”;
Requirement: To get the average Calories of Non-protein type foods.
Select the appropriate function to complete the above query. [1]
(a) Mean
(b) Min
(c) AVG
(d) Sum
Answer:
(c) AVG

Question 11.
Which of the following device may operate at different network speeds depending on the protocol standard they support? [1]
(a) Router
(b) Ethernet card
(c) RJ45 Connector
(d) None of these
Answer:
(b) Ethernet card

Question 12.
Help Ritesh to write the command to display the name of the youngest student. [1]
(a) SELECT Name, MIN(DOB) FROM Student;
(b) SELECT Name, MAX(DOB) FROM Student;
(c) SELECT Name, MIN(DOB) FROM Student GROUP BY Name;
(d) SELECT Name, MAXIMUM(DOB) FROM Student;
Answer:
(b) SELECT Name, MAX(DOB) FROM Student;

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

Question 13.
Which of the following statements is incorrect in the context of a worm? [1]
(a) It represents a category of malware
(b) It creates infections in a computer
(c) It is self replicating
(d) It cannot travel on its own
Answer:
(d) It cannot travel on its own

Question 14.
In MySQL which function is used to find the round off value of the specified floating point number? [1]
(a) FLOAT( )
(b) TRUNCATE( )
(c) ROUND( )
(d) DECIMAL( )
Answer:
(c) ROUND( )

Question 15.
Which of the following operators compare two conditions at a time to determine whether a row can be selected for the output? [1]
(a) Comparison operators
(b) Logical operators
(c) Arithmetic operators
(d) Between operator
Answer:
(a) Comparison operators

Question 16.
Which of the following commands is not a data manipulation command? [1]
(a) SELECT
(b) INSERT
(c) UPDATE
(d) ALTER
Answer:
(d) ALTER

Question 17.
Assertion (A) Cyber bullying is an act of cyber law.
Reason (R) Cyber crime involves the use of computer and network in attacking computers and networks as well. [1]
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(d) Cyber bullying is a cyber crime, it is the use of technology like the Internet, E-mail, cell phones, social media or picture to harass,threaten or target a person. Cyber law is passed under which cyber bullying is considered as a strong crime committed in virtual world.

Question 18.
Assertion (A) Some time we want to combine the two DataFrame using the merge( ) function. [1]
Reason (R) Merging operation can be performed only with common values of column not with specific column.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
Answer:
(c) The joining is performed on columns or indexes. If the joining is done on columns, indexes are ignored.We can specify the column names to use for merging using “on” parameter.

Section – B

Question 19.
Identify the following devices [2]
(i) An intelligent device that connects several nodes to form a network and redirects the received information only to intended node(s).
(ii) A device that regenerates (amplifies) the received signal and re-transmits it to its destinations.
Or
What is a modem?
Answer:
(i) Switch
(ii) Repeater
Or
Modem stands for Modulator/Demodulator, which converts analog signal into digital signal and again digital signal into analog signal. It is used to connect the computers and transmit data using telephone lines.

Question 20.
Prachi has given the following command to obtain the highest marks: [2]
SELECT MAX(Marks) FROM Student WHERE GROUP BY Class;
But she is not getting the desired result. Help her by writing the correct command.
Answer:
SELECT Class, MAX(Marks) FROM Student GROUP BY Class;

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

Question 21.
Write a query to display the Sum, Average, Highest and Lowest marks of the students grouped by subject and sub-grouped by class. [2]
Answer:
mysql> SELECT SUM (marks), AVG (marks), MAX (marks), MIN (marks)
FROM students
GROUP BY subject, class ;

Question 22.
Find the error and Rewrite the below code to create a series properly. [2]
import pandas as p1
Lst1=[1,2,3]
Lst2=list(‘ABC’)
S1 = p1.Series (Lst1, rows=Lst2)
Answer:
While creating series the index has to be specified by the ‘index’ parameter not rows.
import pandas as p1
Lst1=[1.2,3]
Lst2= list(‘ABC’)
S1 = pl.Series( Lst1, index=Lst2)

Question 23.
For avoiding the plagiarism, what guidelines should we follow? [2]
Or
What are digital signatures? Why should we use it?
Answer:
Follow the below guidelines to avoid plagiarism:
(i) To avoid plagiarism, instead of copying the language of the book as it is, try to put it is your own language/words.
(ii) One should have a clear understanding of plagiarism and its consequences, so that no one perform it unintentionally.
(iii) If copying someone else’s work in our task, word for word, then do not forget enclosing it is quotes and also mention its source.
(iv) Another way is to credit the author has write which was useful for your task and not taking credit for its yourself
Or
Digital signature is an electronic form of a signature that can be used to authenticate the identity of the sender of a message or the signer of a document, and also ensure that the original content of the message or document that has been sent is unchanged.
Uses of Digital Signature
(i) Authentication It is used to authenticate the messages.
(ii) Integrity It is used to verify the message that it is modified or not.
(iii) Non-repudiation A sender cannot deny having sent the document after signing it.

Question 24.
Given a DataFrame gradedf: [2]
import pandas as pd
gradedf=pd.DataFrame!{‘Name‘Rashmi ’, ‘Ani’, ‘Sunil’, ‘Becker’],
‘Grade’ : [‘A’, ‘B’, ‘C’, ‘ D ’ ].})
print (gradedf.il0c[0 : 2])
Find the output.
Answer:

Name Grade
0 Rashmi A
1 Ani B

Question 25.
Furniture [2]

Fcode Fname Type Qty
F1 Cot Wooden 5
F2 Bed Iron 2
F3 Sofa Plywood 6

Write the python statements for the following:
(a) To add a column ‘Trice” storing [700,12000,25000]
(b) To add a column Amount’ having values ‘Qty’ * ‘Price’ for all the rows
Answer:
(a) Furniture[‘Price’] = [700, 12000, 25000]
(b) Furniture[‘Amount’] = Furniture[‘Qty’]*Furniture[‘Price’ ]

Section – C

Question 26.
Predict the output of the following. [3]
(i) SELECT POW! INSTR! ‘‘Success@dedi cati on”, 2);
(ii) SELECT MONTH!“2020-11 -15”)*P0W(2, 3): .
(iii) LTRIM(“ Python Basics ’’)
Answer:
(i) 64
(ii) 88
(iii) ’’Python Basics ” only
leading blank spaces will be removed.

Question 27.
Write a python program to create the dataframe with name dfballs from dictionary of different colors of balls Red, Green and Yellow with data values[10,20,30], [30,40,50] and [90,100,110]. [3]
Answer:
import pan das as pd
dfBalls=pd.DataFrameU’Red’:[10,20,30],’Green’:[30,40,50], ’Yellow’:[90,100,110]}) print(dfBalls )

Question 28.
Given a DataFrame “Cellphone” containing the following data: [3]

Index ModelNo Type Brand
0 A22 4G Samsung
1 N95 3G Nokia
2 XPS12 2G Apple

Write the python statements to do the following:
(i) To remove the first row
(ii) The command that changes the Brand column to values [‘Realme’,’Xiomi’,’Samsung’]
(iii) To save the dataframe to a CSV file “Mobiles.csv”
Answer:
(i) Cellphone.drop(O)
(ii) Cellphone[‘Brand’] =[‘Realme’,’Xiomi’,’Samsung’]
(iii) Cellphone.to_csv(‘Mobiles.csv’)

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

Question 29.
Jack received a phone call stating that the call was from his Bank and they asked him his ATM card and PIN number. Also his colleague Jennifer was trying to see his key locations of fingers on the keyboard , while he was trying to open his E-mail account. [3]
(i) What this call may be ………… ?
(ii) What is the symbol © used for ?
(iii) What kind of network threat is Jennifer trying to do?
Or
List the advantages of recycling the e-Waste.
Answer:

  • case of phishing
  • right to copy
  • Snooping

Or
Some advantages of recycling the e-Waste are as follows

  • Conserves Natural Resources
  • Protects Environment
  • Create Jobs
  • Saves Landfill Space
  • Save Money

Question 30.
(i) Write a query to display current date on your system. [3]
(ii) Display the position of occurrence of string ”OR” in the string “CORPORATE LAWYER”
(iii) Mrs. Kumar is using table Students with the following columns:
Rno,AdmNo,Name,Aggregate, display all information of students in descending order of name and with ascending order of aggregate.
Or
Which commands are used to control user’s privileges and how?
Answer:
(i) mysql> SELECT CURDATE( );
(ii) mysql >SELECT INSTR (“CORPORATE LAWYER”, “OR”);
(iii) SELECT * FROM Students ORDER BY AGGREGATE, NAME DESC;
Or
There are two commands that are used to control a user’s privileges
(i) GRANT
(ii) REVOKE
The GRANT command is used to give an existing user privileges, and REVOKE is used to remove privileges of a user does not exist, GRANT will create a new user at the same time and give them all privileges.

Section – D

Question 31.
Write SQL queries for the questions from (i) to (v) on the basis of table Class. [5]

No Name Stipend Subject AvgMark Grade
01 Vikas 1200 Medical 67 B
02 Boby 1400 Humanities 78.4 B
03 Tarun 1000 Medical 64.8 C
04 Varun 1600 Non-medical 84 A
05 Atul 1800 Non-medical 92 A

(i) Select all the non-medical stream students from the table Class.
(ii) Arrange the records of Class name wise.
(iii) List the records whose grade is B or C.
(iv) Insert the new row with the following data. (06, ‘Jack’, 2800, ‘Humanities’, 98, A’)
(v) Identify the attribute to be best suitable for primary key.
Or
Name 5 major string functions with their purpose.
Answer:
(i) SELECT * FROM Class WHERE Subject= ‘Non-medical’;
(ii) SELECT * FROM Class ORDER BY Name;
(iii) SELECT * FROM Class WHERE Grade IN (‘ B ’ , ‘ C ’);
(iv) INSERT INTO Class VALUES (06, ‘Jack’, 2800, ‘Humanities’, 98, ‘A’);
(v) No
Or
1. CHAR( ) This function returns the character value of the given integer value according to the ASCII table. It ignores the NULL value. By default, CHAR( ) returns a binary string.

2. CONCAT( ) This function can have one or more arguments and it returns a string that is the result of concatenating the arguments.

3. SUBSTR( ) This function returns the substring (specified number of character) from a particular position of a given string.

4. TRIM( ) This function is used to return a string after removing all prefix or suffix spaces from the given string. In other words, this function removes leading and trailing spaces from a given string.

5. LENGTH( ) This function returns the length of the string in bytes. The length of the string also includes all the blanks.

Question 32.
Granuda consultants are setting up a secured network for their office campus at Faridabad for their day-to-day office and web based activities. They are planning to have connectivity between 3 buildings and the head office situated in Kolkata. [5]
Answer the questions (i) to (v) after going through the building positions in the campus and other details, which are given below.

Distance between various buildings

Building RAVI to Building JAMUNA 120 m
Building RAVI to Building GANGA 50 m
Building GANGA to Building JAMUNA 65 m
Faridabad Campus to Head Office 1460 km

Number of computers

Building RAVI 25
Building JAMUNA 150
Builing GANGA 51
Head Office 10

(i) Suggest the most suitable place (i.e. Building) to house the server of this organisation. Also, give a reason to justify your suggested location.

(ii) Suggest a cable layout of connections between the building inside the campus.

(iii) Suggest the placement of the following devices with justification
(a) Switch
(b) Repeater

(iv) Consultancy is planning to connect its office in Faridabad which is more than 10 km from head office. Which type of network will be formed?

(v) State the use of HUB?
Answer:
(i) The most suitable place to house the server is JAMUNA because it has maximum number of computers.
(ii) CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 3
(iii) (a) Switches are needed in every building to share bandwidth in every building.
(b) Repeaters may be skipped as per above layout, (because distance is less than 100 m) however, if building RAVI and building JAMUNA are directly connected, we can place a repeater there as the distance between these two buildings is more than 100 m.

(iv) MAN

(v) A hub is a device, used with computer systems to connect several computers together. It acts as a centralised connection to several computers with the central node or server.

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

Question 33.
Given the following bar graph, write the Python code to display same as. [5]
CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 1
Or
Write the code to plot the below chart.
CBSE Sample Papers for Class 12 Informatics Practices Set 3 Img 2
Answer:
import pandas as pd
import matplotlib.pyplot as plt
data = {‘Country’: [‘USACanadaGermanyUKFrance’],
‘GDP_Per_Capita’: [45000,42000,52000,49000,47000]
}
df = pd.DataFrame(data,columns=[‘CountryGDP_Per_Capita’])
df.plot(x “’Country’, y=’GDP_Per_Capita’, kind = ‘bar’)
plt.show( )
Or
import pandas as pd
import matplotlib.pyplot as plt
data = {‘Year’: [1920,1930,1940,1950,1960,1970,1980,1990,2000,2010],
‘Unemployment_Rate’: [9.8,12,8,7.2,6.9,7,6.5,6.2,5.5,6.3]
}
df = pd.DataFrame(data,columns=[‘Year’,’Unemployment_Rate’])
df.plot(x =’Year’, y=’Unemployment_Rate’, kind = ‘line’)
pit. show( )

Section – E

Question 34.
Given the following code, where a series is created storing population of some cities: [1 + 1 + 2]
import pandas as pd
popseries=pd.Series][34567,890,450,678,900])
(a) What will be the output of following commands?
(i) print(popseries.tai1 (3) .head]2))
(ii) print(popseries/2)

(b) Write the Python statement to display the elements of dataset With value above 500.
Or (Option for part (b) only)
Write Python statement to assign index to the series as 11,12,13,14,15.
Answer:
(a)
(i)
2 450
3 678

(ii)
0 17283.5
1 445.0
2 225.0
3 339.0
4 450.0

(b) print(popseries[popseries>500])
Or
popseries.index=[11,12,13,14,15]

Question 35.
Consider the following table MASTER. [1+1+2]

SNo Name Age Department Salary
1 Shyam 21 Computer 12000
2 Shiv 25 Maths 15000
3 Rakesh 31 Hindi 14000
4 Sharmila 32 History 20000
5 Dushyant 25 Software 30000

(i) Write a command to update the salary of the employee to 40000, whose SNo is 3.
(ii) Write a query to add a column Date_of_ Joining to the table MASTER.
(iii) Write a query to display Age and Department of those employees whose salary is greater than 12000.
Or (Option for part (iii) only)
Write a query to display Name whose Salary is more than 15000 and Department is Computer.
Answer:
(i) UPDATE MASTER SET Salary= 40000 WHERE SNo =3;
(ii) ALTER TABLE MASTER ADD Date_of_Joining Date;
(iii) SELECT Age, Department FROM MASTER WHERE Sal ary>12000;
Or
SELECT Name FROM MASTER WHERE Department = “Computer” AND Salary > 15000;