INFORMATICS PRACTICES (065) - 2021
SAMPLE PAPER
CLASS - XII
SET -2
==============================================
Part-A
Section-I
Select the most appropriate option out of the options given for each question. Attempt any 15 questions from question no 1 to 21 (Each 1 Marks)
1. State whether True or False:
i. Digital Software Penetration is carried out with tools
such as cracks, keygen etc. ________
ii. In Freeware the source code is hidden from the user.
_________
Ans
i. True
ii. True
2. Fill in the blanks :
The command used to display the title for x-axis to a
graph is _________
a. plt.xtitle()
b. plt.xaxis()
c. plt.xlabel()
d. plt.xaxistitle()
Ans:
c. plt.xlabel()
3. Write the output of the following SQL command.
select substr(“COMPUTER”,3,4);
a. MPUT
b. PUTE
c. PU
d. MP
Ans:
a. MPUT
4. Given a Pandas series called p_series, the command
which will display the last 4 rows is __________________.
a. print(p_series.Tail(4))
b. print (p_series.Tails(4))
c. print (p_series.tail(4))
d. print(p_series.Tails(4))
Ans:
c. print (p_series.tail(4))
5. Given the following DataFramesDS1 and DS2:
DS1 DS2
|
A |
B |
|
X |
Y |
0 |
CAT |
10 |
0 |
OWL |
10 |
1 |
DOG |
20 |
1 |
CROW |
20 |
2 |
COW |
30 |
2 |
SWAN |
30 |
Write a command to find the sum of columns B and Y.
Ans:
Ans: DS1.B+DS2.Y
OR
DS1[‘B’]+DS2[‘Y’]
6. Using Python Matplotlib histograms can be used to
count how many values fall into each interval. Each interval is known as
a. hist
b. class
c. bin
d. label
Ans:
c. bin
7. Define the term firewall.
Ans: A system designed to prevent
unauthorized access to or from a private network.
8. To represent data column wise in a
DataFrame the axis is __________
Ans: 1
9. In network terms UTP stands __________________
Ans: Unshielded Twisted Pair
10. The fraudulent practice of sending
emails purporting to be from reputable companies in order to induce individuals
to reveal personal information such as password and credit card numbers is
known as _________________
Ans: Phishing
11. The now() function in MySql is an example of
___________________.
a. Math function
b. Text function
c. Date Function
d. Aggregate Function
Ans:
c. Date Function
12. ____________ refers to the practice of obtaining the
contribution from crowd in the form of needed services, ideas, or content
mainly from online community.
Ans: Crowd Sourcing
13. In Pandas the function used to check for null values
in a DataFrame is ________
Ans: isnull
14. ____________ is a distinct address for each resource
on the internet.
Ans: IP Address
15. Which amongst these is not an example of web server?
a. Apache
b. JWS
c. IIS
d. Chrome
Ans:
d. Chrome
16. __________ is a code hidden in a program such as a
game or spreadsheet that looks safe to run but has hidden side effects.
Ans: Trojan Horse
17. Suggest a point which supports the statement the
management of e-waste will create jobs.
Ans: Segregation / Recycling etc
OR
Any Correct Point
18. The _________ command is used to make the changes in
a table permanent.
Ans: Commit
19. Give SQL command that will display the current month
from the date and time.
Ans: month()
20. ___________ is a network device which segments
networks into different sub networks called subnets.
Ans: Switch
21. Give an advantage of using the star topology in a
computer network.
Ans: Easy to add new stations
Easy to monitor and troubleshoot
Can accommodate different wiring
OR
Any Other Point
Section-II
Both
the Case study based questions are compulsory. Attempt any 4 sub parts from
each question. Each question carries 1 mark
22. Consider the Data Frame below and
answer the questions that follow.
|
Name |
Weight |
Height |
A_1 |
Pawan |
50 |
153 |
A_2 |
Piyush |
60 |
165 |
A_3 |
Prem |
40 |
150 |
A_4 |
Prakash |
70 |
145 |
A_5 |
Prateek |
55 |
160 |
a. Which command will produce the
following output to extract only a part of dataframe?
Piyush |
60 |
Prem |
40 |
Prakash |
70 |
Ans: df.iloc[1:4,1:2]
b. What is the correct syntax to
display the record of Piyush?
i.df_data[df_data['Name']='Piyush']
ii. df_data[df_data['Name']=='Piyush']
iii. df_data[df_data.Name=='Piyush']
iv. df_data['Name']=='Piyush'
Ans: ii and iii
c.
What output of the command
>>>
df_data.max()
Ans:
Name Prem
Weight 70
Height 165
d. How do
you display only the index of the dataframe df_data?
Ans:df_data.index
e. What is
the shape of the dataframe df_data?
Ans: (5,3)
23.
XYZ” Company conducts workshops for employees of
organizations. The company requires data of workshops that are organized.
As a database administrator you have decided that:
Name
of the Database: ABCINC
Name
of the Table: WORKSHOP
Attributes
of Table ‘Workshop’ are as follows
Field |
Type |
WorkshopId |
Integer |
Title |
Varchar(50) |
DateWorkshop |
Date |
NumSpeakers |
Integer |
Table : WORKSHOP
WorkshopId |
Title |
DateWorkshop |
NumSpeakers |
1001 |
Robotics |
2020-02-21 |
3 |
1002 |
AI |
2020-05-24 |
4 |
1003 |
Humanoids |
2020-07-15 |
3 |
1004 |
Block Chain |
2020-04-25 |
5 |
1005 |
Cloud |
2020-03-03 |
4 |
(a) Identify
the attribute best suited to be declared Primary Key.
Ans: WorkshopId
(b)
Write the Degree and cardinality of the table WORKSHOP.
Ans
:
Cardinality : 5
Degree : 4
(c)
Write SQL command to update/modify the Number of Speakers from 3 to 4 of
Humanoids Workshop.
Ans:
SQL>> UPDATE WORKSHOP SET NUMSPEAKERS
= 4 WHERE TITLE=’ HUMANOIDS’;
(d)
Write a command to display the structure of the table WORKSHOP.
Ans:
SQL>> DESC WORKSHOP
(e)
Write a command to delete record of WorkshopId 1002
Ans:
SQL>> DELETE FROM WORKSHOP WHERE
WORKSHOPID=1002;
Part
– B
Section – I (Each 2 Marks)
Write a program in Python Pandas to create the series similar to creating a Dataframe.
Ans:
import pandas as pd
M1=pd.Series([45,65,24,89],index=[‘Term1’,’Term2’,’Term3’,’Term4’],columns=[‘Marks’])
25. What is the difference between
a. Drop and Delete command
b. Update and Alter command.
Explain with an example.
OR
Differentiate between alternate key and candidate key.
Explain with example.
Ans:
DROP |
DELETE |
DDL
Command |
DML
Command |
To
remove entire table along with structure |
To
remove one or more records |
Example |
Example |
Update |
Alter |
DML
Command |
DDL
Command |
To
change or modify data values |
To
change or modify structure |
Example |
Example |
OR
Candidate Key – All keys fit to be
primary keys
Alternate Key – All candidate keys
which are not primary keys
Example.
26. i. Consider the decimal number x with value
8459.2654. Write commands in SQL to round it
to 2 places
before the decimal.
ii. Write
commands in SQL to round it to display the value of 4 to the power 5.
Ans:
i. SELECT ROUND(8459.2654,-2);
ii. SELECT POW(4,5);
27. Consider the Dataframe
Humanoid
|
SName |
Amount |
H_1 |
Alexa |
7000 |
H_2 |
Cortana |
5000 |
H_3 |
Siri |
4000 |
i. Write a command to display the
records of the dataframe which have amount greater than equal to 5000.
ii. How will you change the index from
H_1,H_2,H_3 to 101,102,103
Ans:
i.
Humanoid[Humanoid[‘Amount’]>=5000]
OR
Humanoid[Humanoid.Amount>=5000]
ii.
Humanoid.rename({‘H_1’:101,’H_2’:102,’H_3’:103})
28. Consider
the following table ‘WORKSHOP’ and answer the following:
WORKSHOP
WorkshopId |
Title |
DateWorkshop |
NumSpeakers |
1001 |
Robotics |
2/21/2020 |
3 |
1002 |
AI |
5/24/2020 |
4 |
1003 |
Humanoids |
|
3 |
1004 |
Block Chain |
4/25/2020 |
5 |
1005 |
Cloud |
3/3/2020 |
4 |
What is the output of the following
SQL commands:
a) SELECT COUNT(*) FROM WORKSHOP;
b) SELECT COUNT(DateWorkShop) FROM
WORKSHOP;
Ans:
a) 5
b) 4
29. Consider the following SQL string:
“BEAUTIFUL”
Write commands to display:
a. “BEAU”
b. “beautiful”
OR
Considering the same string “BEAUTIFUL”
Write SQL commands to display:
a. Length of the string
b. “AUT”
ANS:
a. SQL>> SELECT
SUBSTR(‘BEAUTIFUL’,1,4);
b. SQL>> SELECT LOWER(‘BEAUTIFUL’);
OR
a. SQL>> SELECT
LENGTH(‘BEAUTIFUL’);
b. SQL>> SELECT
SUBSTR(‘BEAUTIFUL’,3,3);
30.
Consider the following table ‘salesman’ and write the SQL command:
salesman
SNo |
SName |
Sale1 |
Sale2 |
101 |
George |
15 |
20 |
102 |
Sulivan |
17 |
18 |
103 |
Teresa |
14 |
19 |
104 |
Peter |
12 |
13 |
Write command to
a. Add a new column Sale3
b. Add a new row with values 105, Smith, 18,14
Ans:
A. SQL>> ALTER TABLE SALESMAN
ADD COLUMN SALE3 INTEGER;
B. INSERT INTO SALESMAN VALUES
(105,’SMITH’,18,14);
31. Expand the following terms:
i)
TCP
ii)
URL
iii)
VoIP
iv)
LAN
Ans:
i) TCP – Transmission Control Protocol
ii) URL – Uniform Resource Locator
iii) VoIP – Voice Over Internet
Protocol
iv) LAN – Local Area Network
32. List any issues or problems
encountered while teaching computers to persons with disability or differently
able persons.
Ans:
a) Unavailability of Teaching
Materials or Aids
b) Lack of special needs teachers
c) Lack of supporting curriculum
33. Ambuj has been given a task of
writing a poem for a reputed national magazine. He surfs the internet and
downloads a poem from another author. He then submits it for the magazine as his
work. What sort of crime has he committed? What is the risk involved in such
kind of activity?
Ans:
Plagiarism. Explanation
Section
– II (Each 3 Marks)
34. Consider the commands below:
>>> import pandas as pd
>>> lst=[10,20]
>>> ds=pd.Series([10,20])
Here lst is a list and ds is a series. Both have same values 10 and 20. What will be the output of the following commands.Justify your answer.
a. print ( lst * 2 )
b. print ( ds * 2 )
Ans:
a. [10,20,10,20] – Replication
b.
[20,40] - Multiplication
35. What do you mean by Digital property Rights? How can digital property rights be threatened.
OR
What is Online fraud? Give some measures to stop online frauds.
Ans:
Explanation
36. Write a code to plot the Monthly Attendance of
students in class as shown in the figure given below:
OR
Draw a bar chart as below representing the number of
students in each class.
Student Strength
Ans:
import matplotlib.pyplot as plt
months =
[‘jan’,’feb’,’mar’,’apr’,’may’,’jun’]
attd=[30,50,50,30,30,60]
plt.plot(attd,months)
plt.title(‘Monthly Attendance’)
plt.show()
OR
import matplotlib.pyplot as plt
Classes = ['VII','VIII','IX','X']
Students = [40,45,35,44]
plt.bar(classes, students)
plt.title(‘Student Strength’)
plt.show()
37. Consider the following tables FACULTY and COURSES. Write SQL commands
for the statements (i) to (iii).
FACULTY
F_ID |
Fname |
Lname |
Hire_date |
Salary |
102 |
Amit |
Mishra |
12-10-1998 |
12000 |
103 |
Nitin |
Vyas |
24-12-1994 |
8000 |
104 |
Rakshit |
Soni |
18-5-2001 |
14000 |
105 |
Rashmi |
Malhotra |
11-9-2004 |
11000 |
COURSES
C_ID |
F_ID |
Cname |
Fees |
C21 |
102 |
Grid Computing |
40000 |
C22 |
103 |
System Design |
16000 |
C23 |
104 |
Computer Security |
8000 |
C24 |
103 |
Human Biology |
15000 |
C25 |
102 |
Computer Network |
20000 |
C26 |
105 |
Visual Basic |
6000 |
i) Select F_ID, sum(Fees) from COURSES group by F_ID;
ii) Select Max(Salary), Min(Salary) from Faculty;
iii) Select Fname, Cname from FACULTY, COURSES where COURSES.F_ID =FACULTY.F_ID and COURSES.F_ID=102;
Ans:
i)
F_ID |
Fees |
102 |
60000 |
103 |
31000 |
104 |
8000 |
105 |
6000 |
ii)
Max(Salary) |
Min(Salary) |
40000 |
6000 |
iii)
Fname |
Cname |
Amit |
Grid Computing |
Amit |
Computer Network |
Section
– III (Each 5 Marks)
38. Write a program in Python Pandas to create the following DataFrame salesman from a Dictionary:
Salesman
SNo |
SName |
Sale1 |
Sale2 |
101 |
George |
15 |
20 |
102 |
Sulivan |
17 |
18 |
103 |
Teresa |
14 |
19 |
104 |
Peter |
12 |
13 |
Perform the following
operations on the DataFrame:
i. Display the average
score of Sale1 column.
ii. Show the sales of
Sulivan only.
iii. Display the
Dataframe
Ans:
import pandas as pd
Salesman=pd.DataFrame({‘SNo’:[101,102,103,104],’SName’:[‘George’,’Sulivan’,’Teresa’,’Peter’],’Sale1’:[15,17,14,12],’Sale2’:[20,18,19,13]})\
i) df.Sale1.mean() OR df[‘Sale1’].mean()
ii)
Salesman[Salesman.SName==’Sulivan’]
OR
Salesman[Salesman[‘SName’]==’Sulivan’]
iii) print (Salesman)
39. Write
the SQL functions which will perform the following operations:
i) To display the day of the current date.
ii) To display the first four letter of the text “EDUCATION”.
iii) To display the text “EDUCTAION” in lower case.
iv) To remove spaces from the beginning and end of a string, “ CBSE ”.
v) To compute the sum between two numbers, n1 and n2
OR
In a database company ,
there are two tables given below
Table:
SALES
SALESMANID |
NAME |
SALES |
LOCATIONID |
S1 |
ANITA SINGH ARORA |
250000 |
102 |
S2 |
Y.P. SINGH |
1300000 |
101 |
S3 |
TINA JAISWAL |
1400000 |
103 |
S3 |
GURDEEP SINGH |
1250000 |
102 |
S5 |
SIMI FAIZAL |
1450000 |
103 |
Table:
LOCATION
LOCATIONID |
LOCATIONNAME |
101 |
Delhi |
102 |
Mumbai |
103 |
Kolkata |
104 |
Chennai |
Write SQL Query for the following
Display all the records from sales
table
Display the location of SIMI FAIZAL
Display the salesman name from Mumbai
location
Display the salesman name with sales
more than 100000
Display the salesman record from sales
and location table with name starting with ‘A’
Ans:
SQL>> SELECT DAY(NOW());
SQL>> SELECT LEFT(‘EDUCATION’,4)
SQL>> SELECT LOWER(‘EDUCATION’)
SQL>> SELECT LTRIM(“ CBSE
”)
SQL>> SELECT
SUM(N1,N2);
OR
(I) SQL>> SELECT * FROM SALES;
(II) SELECT
LOCATIONNAME FROM SALES, LOCATION WHERE SALES.LOCATIONID=LOCATION.LOCATIONID
AND SALES.NAME=’SIMI FAIZAL’;
(III) SELECT
NAME FROM SALES, LOCATION WHERE SALES.LOCATIONID=LOCATION.LOCATIONID AND
LOCATION.LOCATIONNAME=’MUMBAI’;
(IV) SELECT
* FROM SALES WHERE SALES>100000;
(V) SELECT
LOCATIONNAME FROM SALES, LOCATION WHERE SALES.LOCATIONID=LOCATION.LOCATIONID
AND NAME LIKE ‘A%’;
40. Ayurveda
Training Educational Institute is setting up its centre in Hyderabad with four
specialised departments for Orthopedics, Neurology and Pediatrics along with an
administrative office in separate buildings. The physical distances between
these department buildings and the number of computers to be installed in these
departments and administrative office are given as follows. Answer the queries
as raised by them in (i) to (v).
Shortest distances
between various locations in meters:
Number of Computers
installed at various locations are as follows:
a) Suggest the
most suitable location to install the main server of this institution to get
efficient connectivity.
b) Suggest the
best cable layout for effective network connectivity of the building having
server with all the other buildings.
c) Suggest the
devices to be installed in each of these buildings for connecting computers
installed within the building out of the following : Gateway, switch, Modem
d) Suggest the
topology of the network and network cable for efficiently connecting each
computer installed in each of the buildings out of the following :
Topologies:
Bus Topology, Star Topology
Network Cable:
Single Pair Telephone Cable, Coaxial Cable, Ethernet Cable.
e) The university is planning to connect its
admission office in Delhi, which is more than 1250km from university. Which
type of network out of LAN, MAN, or WAN will be formed? Justify your answer.
Ans:
a)
Administrative Office
ReplyDeleteWe have all the certification exams and their answers available online to help people on this site, so that people will get the certificate easily
hazimhassan
Thanks for this question paper
ReplyDelete