IP Answer Key Class XII

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Registration No:

ALL KERALA COMMON MODEL EXAMINATION


INFORMATICS PRACTICES (065)
CLASS XII (2023 – 24)

TIME : 3 Hours MAX. 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

1. A circuit board mounted on the motherboard of a computer that acts as an [1]


interface between the computer and the network is called ______________.
Ans: Network Interface Card (NIC card in short) or Ethernet card
2. When e-waste such as electronic circuit boards are burnt for disposal, the [1]
elements contained in them create a harmful chemical called ________,
which causes respiratory disorders and brain damage.
i. Lead
ii. Beryllium
iii. Cadmium
iv. Mercury
Ans: iv
3. Technology not protected by copyright and available to everyone, is [1]
categorized as:
i. Shareware
ii. Open Source
iii. Proprietary
iv. Experimental
Ans: ii
4. You are the sports leader of the 'ABC Public School'. On sports day, you [1]
have to calculate the average of the scores obtained by different games.

You have been given the column ‘Score’ in the table 'SPORTS', which
contains the scores of different games as (5, NULL, 2, 5).

What will be the output when calculating the average of the scores obtained
by different games?

i. 4
ii. 3
iii. 3.5
iv. 5

Ans: i

5. Riya, a student in class XII, has downloaded a CSV file from the internet for [1]
her project. However, she does not want the previous data, which is in the
first five rows of the file, for her data analysis. She wants to skip the previous
data while importing the CSV file into the dataframe. Help her to skip the first
5 rows of the CSV file by choosing the right argument in read_csv().
i. skip_rows = 5
ii. noread - 5
iii. skiprows = 5
iv. skip - 5

Ans: i

6. Which of the following SQL query is use to retrieve the string ‘INDIA’ from [1]
the text “&& INDIA &&”.
i. SELECT TRIM('&&') FROM '&& INDIA &&';
ii. SELECT TRIM('&&' FROM '&& INDIA &&');
iii. SELECT TRIM('&& INDIA &&' FROM '&&');
iv. SELECT TRIM('&&INDIA&&');

Ans: ii

7. Firewalls are used to protect against ________. [1]


i. virus attacks
ii. fire attacks
iii. unauthorized access
iv. data driven attacks

Ans: iii

8. Ramandeep is a young woman with great aspirations and has a good team [1]
of like - minded people. She along with her team members started a
company to sell handicrafts online and also designed a logo for their
company. What type of intellectual property does this logo represent?
i. Patents
ii. Trademark
iii. Design
iv. Copyright

Ans: iv

9. Predict the output of the following query: [1]


SELECT INSTR('SEVEN POINT', 'e');
i. 2
ii. ‘E’
iii. 1
iv. 0
Ans: i

10. What will be the output of the following? [1]

>>> import pandas as pd


>>> seriesMnths = pd. Series([ 1,2,3,index=[ "Jan", "Feb", "Mar")
>>> seriesMnths[ 1]

i. Index Error
ii. 2
iii. Feb
iv. Jan

Ans: ii

11. Which of the following is not a text function in SQL? [1]

i. length( )
ii. instring( )
iii. substr( )
iv. left( )
Ans: ii

12. The first network is [1]


i. Internet
ii. NSFnet
iii. NET
iv. ARPANET

Ans: iv

13. What is the significance of the statement "HAVING COUNT (emp_id)>2" in [1]
the following MySQL statement?
SELECT name, COUNT (emp_id),emp_no FROM department GROUP BY
name HAVING COUNT (emp_id)>2;
i. Selecting those rows whose total emp_id>2
ii. Both filter out all rows whose total emp_id below 2 and selecting
those rows whose total emp_id>2
iii. Filter out all rows whose total emp_id below 2
iv. None of these
Ans: ii

14. Rahul wants to disable cookies in his browser. Under which of the following [1]
browser settings options/panels can Rahul disable the cookies?
i. Home Panel
ii. Search Panel
iii. Privacy and Security Panel
iv. General Panel
Ans: iii

15. The manufacturer of any electronic equipment will be “personally” [1]


responsible for the final safe disposal of the product when it becomes an e-
waste.

The above guidelines for proper handling and disposal of e-waste have been
issued by whom?

i. Information Technology Act


ii. Department of Information Technology
iii. Central Pollution Control Board
iv. The Environment Protection Act
Ans: iii

16. Out of the following, which function cannot be used for customization of [1]
charts in Python?
i. xlabel()
ii. color()
iii. title()
iv. xticks()
Ans: ii

17. Assertion (A): Pandas.head() is an attribute of the Python data structure. [1]
Reason (R): It is used to display the first/top 5 records of any
series/dataframe.
i. Both A and R are true and R is the correct explanation of A.
ii. Both A and R are true but R is not the correct explanation of A.
iii. A is true but R is false.
iv. A is false but R is true.

Ans: iv

18. Assertion (A): Privacy of sensitive data can be implemented by encryption. [1]
Reason(R): Encryption hides (Encodes) the details of the Actual data.

i. Both A and R are true and R is the correct explanation of A.


ii. Both A and R are true but R is not the correct explanation of A.
iii. A is true but R is false.
iv. A is false but R is true.
Ans: i

SECTION B

19. Mention any four differences between Internet & WWW. [2]
OR
Lia is doing a course in Web Technologies. As a part of her project, she
needs to extend and modify the functionality of her web browser. She has
opted to use add-ons or plug-ins to boost the performance of the browser.
However, she doesn’t know the difference between these tools. Help her
understand the difference between add-ons and plug-ins with an example.
Ans:
INTERNET WORLD WIDE WEB (WWW)
Internet is a means of WWW is a collection of information
connecting a computer to which is accessed via the Internet.
any other computer
anywhere in the world.
Internet is primarily WWW is more software-oriented as
hardware-based. compared to the Internet.

Internet is superset of WWW is a subset of the Internet


WWW
Internet is independent of Depend on Internet to work
WWW
Internet is governed by WWW is governed by Hyper Text
Internet Protocol Transfer Protocol
The first version of the In the beginning WWW was known
Internet was known as as NSFNET.
ARPANET.
It is originated sometimes English scientist Tim Berners-Lee
in late 1960s. invented the World Wide Web in
1989.
Internet is infrastructure. WWW is service on top of that
infrastructure.

Write any four differences


OR
A plug-in is a complete program or a third-party software that is installed on
the host computer and can be used by the browser for multiple
functionalities and can even be used by other applications as well.
E.g. - A Flash player is required to play a video in the browser.

An add-on is not a complete program and it is used to add only a particular


functionality to the browser. An add-on is also referred to as extension in
some browsers.

E.g. - Adding the functionality of a sound and graphics card is an example of


an add-on.

20. Consider the given dataframe ‘num’: [2]

Fill in the blanks to get the given output:


a.

print(num.loc[ ____________ , ____________ ])

b.

print(num.iloc[______________ , _____________])
Ans:
a. print(num.loc[[1,3],['C1','C2']])
b. print(num.iloc[[2,3],2])
or
print(num.iloc[2:4,2])
21. Consider the following table BOOK. [2]

Give the output of the following SQL commands on the basis of the above
table BOOK.
SELECT LEFT (Publication, 1) FROM BOOK WHERE Price > 280;
Ans:

LEFT (Publication, 1)
y
b

22. Ruhi has just designed a website for her boutique ‘Grace’ in HTML language [2]
and now she needs a web address for the page. Briefly discuss about URL
and its components to uniquely identify web resources with a suitable
example.

URL is Uniform Resource Locator and provides the location and mechanism
(protocol) to access the resource.

Example of URI identifying resources using location (i.e., URL) is

http://www.grace.bou.in/categories/kids/dress.htm

The components of URL are the following:

Parts Description Example

Protocol represents name of the protocol http


which is used to transfer the
data/web page
Domain represents name of the web www.grace.bou.in
Name server where the web page
resides
Directory Represents location of the web categories/kids/
Path page on the web server

Object name of file dress.htm


Name

23. Complete the given Python code to get the required output as “Italy” from [2]
the given dataframe ‘populations’:

import pandas as ps
pop = [ [ ’Italy’,61,0.83],[ ’Spain’,46,0.63],[ ’Greece’,11,0.15] ]
populations = _______________(pop, _______ = [ ’Country’, ’Population’ ,
’Percent’],
________ = [ 1,2,3])
print(populations.loc[ ________________)

Ans:
import pandas as ps
pop = [['Italy',61,0.83],['Spain',46,0.63],['Greece',11,0.15]]
populations = ps.DataFrame(pop,columns =
'Country','Population','Percent'], index = [1,2,3])
print(population.loc[1,'Country'])

24. Kaushal writes the following commands with respect to a table student [2]
having fields name, rollno, marks and records of 5 students.

Command1 : select count(marks) from student;


Command2 : select count(*) from student;
He gets the output as 4 for the Command1 and 5 for Command2. Explain
the output with justification.
Ans:
This is because the column marks contain a NULL value and the aggregate
functions do not take into account NULL values. Thus, Command1 returns
the total number of non-NULL values in the column marks, whereas
Command2 returns the total number of records in the table.
25. Kavyanjali, a chemical analyst, needs to arrange data of few elements in the [2]
form of two series containing symbols and their atomic numbers
respectively. Thereafter, the data of these two series has to be arranged and
displayed in the form of Data Frame as shown below:

Ans:
import pandas as pd
I=['Hydrogen','Helium','Lithium','Beryllium']
D1=['H','He','Li','Be']
D2=[1,2,3,4]
S1=pd.Series(D1,I)
print("First Series: ")
print(S1)
S2=pd.Series(D2,I)
print("Second Series: ")
print(S2)
D = {'Symbol': S1,'Atomic Number': S2}
DF=pd.DataFrame(D)
print("DataFrame:")
print(DF)
SECTION C

26. Consider the following records in ‘STUDENT’ table and answer the given [3]
questions:

Admno Name Class DOB House Gender

20150001 Dimple Varma 10 2002-07- Green Female


29
20140212 Mohit Bhardwaj 11 2003-12- Red Male
01
20130216 Mukesh Sharma 9 2001-01- Red Male
29
20190227 Rahul Arora 10 NULL Blue Male

20120200 Swapnil Bhatt 11 2003-07- Red Female


05

i. Write SQL query that will give the output as:


4
ii. Write command for the following:
To change the class of Mukesh Sharma with admission number
20130216 to 10.
iii. What is the cardinality of the table 'STUDENT'?
Also identify the most suitable column of the STUDENT table to make
as primary key.
OR
Predict the output of the following queries based on the table ‘STUDENT’
given above:
i. SELECT MID(Name,LENGTH(House)-1,2) FROM STUDENT;
ii. SELECT DAY(DOB) FROM STUDENT WHERE Class > 10;
iii. SELECT INSTR(House, RIGHT(Gender,1)) AS 'INSTRING' from
STUDENT;
Ans:
i. SELECT COUNT(DOB) FROM STUDENT;
ii. UPDATE STUDENT SET Class = 10 WHERE Admno =
20130216;
iii. 5
Admn
OR
i.

ii.

iii.

27. Write python code to create a Dictionary ‘dict’ to store rollno, name and [3]
marks of three students. Convert dict into DataFrame df and display the
DataFrame df.
Ans:
import pandas as pd
dict ={'roll':(1,2,3),'name':('a','b','c'),'marks':(24,53,66)}
df=pd.DataFrame(dict)
print (df)
28. In the database ‘Hospital’, create a table named ‘patient’ based on the [3]
following specifications:

Column Name Data Type Constraints


PID Varchar Primary Key
PName Varchar
Gender Char Not Null

Also write SQL statement for the following:


i. Add a new column Rec_ID of integer data type.
ii. Change the constraint from not null to null in the column Gender.

Ans:
CREATE TABLE patient (PID VARCHAR(5) PRIMARY KEY, PName
VARCHAR(30), Gender CHAR(1) NOT NULL);

i. ALTER TABLE patient ADD Rec_ID int;


ii. ALTER TABLE patient MODIFY Gender CHAR(1) NULL;

29. Riti received a message that she needs to update the KYC for her Bank [3]
Account; therefore, she should upload her Aadhar Card, Bank Account
Number, and OTP to the link given in her message. Answer the following
questions:

i. Should Riti upload the documents and give the OTP on the link?
ii. What is the act mentioned in the message known as?
iii. Under which act can she lodge a complaint with the relevant
authorities?
iv. Suggest her any two precautionary measures that she should take in
the future while being online to avoid any such situations.

OR

Kartik is fond of playing computer games. What are the different health
hazards that can occur due to excessive use of computer or smart phone
screens, and how can the health hazards be addressed?

Ans:

i. No
ii. Phishing

iii. Information Technology Act, 2000 (also known as IT Act).

iv. Call her bank immediately to recheck the validity of the message
received.

Never share personal credentials like username and password with others

OR

- interacting in an improper posture can be bad for us — both


physically, and mentally
- spending too much time on Internet can be addictive
- can have a negative impact on our physical and psychological well-
being: Eye strain, Body strain, fatigue, backaches, neck and shoulder
pains, painful condition of wrists and fingers, Stress, physical fatigue
and obesity
These health concerns can be addressed to some extent
- by taking care of the way we position such devices and the way we
position our posture: Ergonomics helps us in reducing the strain on
our bodies — including the fatigue and injuries due to prolonged use.
- rid of dry, watering, or itchy eyes, it is better to periodically focus on
distant objects, and take a break for outdoor activities.
30. Consider the given DataFrames ‘Stock’ [3]

Write suitable Python statements for the following:


i. Add a column called “Price” with the following data:
[300,20,50,40,15]
ii. Add a new product “ruler” with a product ID as 6, 5 number of
quantities, and a price of Rs 8.
iii. Rename the column “Price” as “UnitPrice”.
Ans:
i. Stock['Price'] = [300,20,50,40,15]
ii. Stock.loc[5] = [6,'ruler',5,8]
iii. Stock.rename({'Price':'UnitPrice'}, axis = 1, inplace = True)
SECTION D

31. Imagine you are assigned to be the HR manager of a multinational [4]


company. The company uses an SQL database to track employee details in
a table named ‘EMP’. The ‘EMP’ table has columns for ‘EID’ (Primary Key),
‘EName’, ‘DOJ'(Date of Joining), 'Salary', and ‘Dept’.
The following scenarios represent different human resource management
tasks:
i. Salary Increment: After the revised pay scale, the ‘Salary’ of
employees, with ‘EID’ “E115” and “E332” named “Anurag” and
“Prabhaker” respectively, should be increased by 5%.
ii. Number of Employees: You need to get the total number of
employees in each department.
iii. Employee Availability Check: You need to check the availability of
employees who joined before November 17, 2016 in the ‘ADMIN’
department.
iv. Average Salary: You need to display the average salary for those
departments that have more than 15 employees.
Ans:
i. UPDATE EMP SET Salary = Salary + Salary * 5/100 WHERE
EID = ' E115' or EID = ' E332';
OR
UPDATE EMP SET Salary = Salary + Salary * 5/100 WHERE
EID IN( ' E115' , ' E332');

ii. SELECT COUNT(*) FROM EMP GROUP BY Dept;


iii. SELECT * FROM EMP WHERE DOJ<'2016-11-17' AND DEPT
= 'ADMIN';
iv. SELECT AVG(Salary) FROM EMP GROUP BY Dept HAVING
COUNT(*) > 15;

32. Mr. Sharma, a game developer, has plotted a chart to estimate the
distribution of two different ratings of the various games available in the Play
Store, as shown below:

He is trying to write the following statements to plot the graph. Help Mr.
Sharma to fill up the blanks with Python code to get the desired output.

import pandas as pd
__________________ # statement 1
df = _________( # statement 2
{'Games':['Subway','Surfer','Temple Run','Candy Crush','Bottle Shot','Runner
Best'], 'Rating1':[15,5,6,18,20,15], 'Rating2':[25,10,28,45,32,30] } )

_______ (kind = 'bar', x = 'Games', y = ____________) # statement 3 & 4


mat.xlabel('Games')
mat.ylabel('Rating')
mat.title('Ratings of Games')
mat.show()
i. Choose the correct Python statement to import the library to plot the
bar graph in statement 1.
ii. Choose the correct Python statement to create the dataframe in
statement 2.
iii. Choose the correct Python statements in statements 3 and 4,
respectively, to plot a bar graph from the dataframe created.
OR
(Option for part iii only)

Write the Python statement to export the dataframe created to the CSV file
named “DATA”, which is in the “D” drive.

Ans:
i. import matplotlib.pyplot as mat
ii. pd.DataFrame
iii. df.plot(kind = 'bar', x = 'Games',
y = ['Rating1','Rating2'])
OR
df.to_csv("D:\\DATA.csv")

SECTION E

33. Write suitable SQL queries for the following: [5]


i. To calculate the exponent for 5 raised to the power of 6.
ii. To retrieve the current year.
iii. To round off the value 8659.8953 to the nearest hundered.
iv. To display the position of ‘-‘ from the string "Israel-Hamas
Conflicts".
v. To convert the text in the 'Item_Name' column of the 'ITEM' table
to uppercase.
OR
Observe the given tables carefully and attempt the following questions:
Table : Student
Roll No Name Class Section Registration_ID
11 Mohan XI 1 IP-101-15
12 John XI 2 IP-104-15
21 Sohan XII 1 CS-103-14
22 Meena XII 2 CS-101-14
23 Juhi XII 2 CS-102-10
Table: Project
Registration_ID ProjectNo
IP-101-15 101
IP-104-15 103
CS-103-14 102
CS-101-14 105
CS-102-10 104

i. Identify the column based on which both tables can be related or


joined. Also, justify your answer.
ii. Write the SQL query to list the names of the students with their
project numbers in descending order.
iii. Write the SQL query to find the total number of students in each
class.
iv. Write the SQL query to retrieve six characters extracted from the
fourth left character onwards from the ‘Registration_ID’ of the
“Student” table.
v. Write the SQL query to remove the leading and trailing spaces
from the names of the students.
Ans:
i. SELECT POW(5,6);
ii. SELECT YEAR(NOW());
iii. SELECT ROUND(8659.8953 , -2) ;
iv. SELECT INSTR('Israel-Hamas Conflicts','-');
v. SELECT UPPER(Item_Name) FROM ITEM;
OR
i. Registration_ID as it is present in both the tables having related
values.
ii. SELECT S.Name, P.ProjectNo FROM Student S, Project C
WHERE S.Registration_ID = P. Registration
ORDER BY P.ProjectNo DESC;
iii. SELECT COUNT(*) FROM Student GROUP BY Class;
iv. SELECT MID(Registratiom_ID,6,4) FROM Student;
v. SELECT TRIM(Name) FROM Student;
34. Learn Together is an educational NGO. It is setting up its new campus at [5]
Jabalpur for its web - based activities. The campus has four compounds as
shown in the diagram below:

Centre to centre distance between various compounds as per


architectural drawing (in meters) is as follows:

Expected number of computers in each compound are as follows:

i. Suggest a cable layout of connections between the compounds.


ii. Suggest the most suitable place (i.e. compound) to house the
server for this NGO. Also, provide a suitable reason for your
suggestion.
iii. Suggest the placement of the following devices with justification:
a. Repeater
b. Hub/Switch
iv. The NGO is planning to connect its international office situated in
Mumbai, which out of the following wired communication link, will
you suggest for a very high-speed connectivity?
a. Optical Fibre
b. Telephone analog line
c. Ethernet cable
d. None of these
v. Which protocol or service will be most helpful to conduct live
interactions between experts from Mumbai office and people at
the Jabalpur campus?

Ans:
i. Star Topology

OR Bus Topology

ii. The most suitable place to house the server is Training Compound as it
has maximum number of computers.
OR
The most suitable place to house the server is Training Compound as it has
least distance.
iii.
a. Repeater: As per one layout (shown in (i)), the repeater can be avoided
as all distances between the compounds are <=100 m.
Between Training & Main compound & Training & Finance
b. Hub/Switch: In all the compounds.
iv. Optical Fibre
v. VoIP (Voice Over Internet Protocol)

35. The table below shows the marks of two students for the four-unit tests for [5]
academic session 2022-2023. Plot a line graph for each student with test
names on the X axis, marks on the Y axis, and a legend in the upper right of
the chart. Also, save the figure obtained.

OR
You are provided with the following data on the number of students who
participated in a programming competition over the years:

Create a bar graph to visualize the growth of participants over the years.
Give appropriate labels and also save the figure obtained.
Ans:
import matplotlib.pyplot as plt
Tests= ['Unit1','Unit2','Unit3','Unit4']
Rohit = [85,88,89,87]
Suman = [97,99,90,92]
plt.plot(Tests, Rohit)
plt.plot(Tests, Suman)
plt.legend(['Rohit','Suman'],loc = 'upper right')
plt.xlabel('Tests')
plt.ylabel('Marks')
plt.show()
plt.savefig('chart.png')
OR
import matplotlib.pyplot as plt
years = [2018, 2019, 2020, 2021]
participants = [150, 180, 210, 250]
plt.bar(years, participants, color='blue')
plt.xlabel('Year')
plt.ylabel('Participants')
plt.title('Growth in Participants Over the Years')
plt.show()
plt.savefig('chart.png')

You might also like