You are on page 1of 122

Proficiency Building Zon

OStage I| Proficiency
Lepavpeer
(With Solutions at: the end off

SAMPLE
QUESTION PAPER 7
Informatics Practices
Time:3 hrs Max. Matks
Instructions
five sections, Section A to E.
1. This question paper contains
2. Allquestions are compulsory.
01 mark each.
3. Section A has 18 questions carrying
questions carrying 02 marks each.
4. Section Bhas 07 Very Short Answer type
questions carrying 03 marks each.
5. Section C has 05 Short Answer type
each.
6. Section D has 02 questions carrying 04 marks
7. Section E has 03 questions carrying 05 marks each.
Language only.
8. All programming questions are to be answered using Python

Section A
1. Intentionally kept traces of activities done over the web are called
(a) passive digital footprints (b) data prints
(c) digital traceback (d) active digital footprints
2. Snigdhafound her image attached to an unknown person and published in asocial netwoi
site. What should she do?
(a) Complain the cyber crime cell (b) Ignore it
(c) Upload more pictures of herself (d) Try to contact the source

3. While creating a Series, the number of values


(a) should be same as number of indexes (b) can be more than the number of indexes
(c) can be less than the number of indexes (d) Both (b) and (c)
4. Selling of a software illegally for temporary use as on rent basis is called
(a) Renting (b) Softlifting (c) Downloading (d) Counterfeiting
5. Which of the following function returns only date part from the given date/time argument
(a) DATE() (b)CURDATE() (c) DATECUR() (d) None of these
6. Which of the ollowing cannot be used to access data from a DataFrame?
(a) loc( ) (b) iloc() (c) head) (d) getdata()
OStageitProficiency Level
Sbeveed Sample Paper 7 91

7. Sunatsconmputer system was not wOrkine due to a roblem in the CPU, what should she do
with it? [11
(a)Dispose the entine set and buy a new one
(b) Neeping the usable eomponents dispose the unised parts (o an e-Waste recycler
(c) Dispose the system casually anvwhere
id) Give it to her sister for play
[11
. The "T" property can be used on (d)invalid parameter
(a)Series (b) Databrame (c) Both (a) and (b)
are to11
related
9. Use of eleehone means to perform business transactions (d) All of these
(a) e-Commerce (b)e-Business (c) e-Shopping
[1]
10. What willbe returned by the given query?
SELECT INSTRCINDIA', "DI'):
(a) 2 (b) 3 (c)-2 (d)-3
[1]
11. is a text based web browser?
(c) Safari (d) Allof these
(a) Opera (b) Linux
argument string to the uppercase
12. Which of the following function converts the characters of an [1]
characters?
(c) Both (a) and (b) (d) None of these
(a) UCASE() (b) UPPER)
[1]
13. Firewalls are
(a) softwares that destroy viruses (b) commercial softwares
(d) cleaner softwares
(c) utilities that filter the entry of malwares
Customers
Choose the correct query to display the length of customer's name(CNAME) from [1
14.
table.
omers;
(a) mysql>SELECT LENGTH(CNAME) FROM Cust
Customers;
(b) mysql>SELECT LEN(CNAME) FROM Customers:
(c) mysql>SELECT COUNT(NAME) FROM
(d) mysql>SELECT COUNT(CNAME) FROM Customers;
(1]
functions?
15. Which clause is used with aggregate (c) WHERE (d) Both (a) and (b)
(a) GROUP BY (b) SELECT
a string passed as an
Which function only removes the trailing space from the characters of [1]
16.
argument? (c) RTRIM() (d) Both (a) and (c)
(b) LTRIM()
(a) TRIM()
Reason based Questions.
Directions (Q.Nos. 17-18)Assertion and
wide collection of networked computers, which are able to
a world
17. Assertion (A) The Internet iseach other very quickly. [1)
exchange information with
gateway is a device that connects dissimilar networks.
Reason (R) A explanation of A.
correct
(a) Both A and R are true and R is the explanation ofA.
Both A andR are true but R is not the correct
(b)
(c) A is true but R is false.
(d) A is false but R is true.
Informatics Practices Class 1
92 OStage I Proficiency Level
and
representation of information data
18. Assertion (A) Data visualisation refers to the graphical
using visual elements like charts, graphs and maps etc.
command pip install matplotlib.
Reason (R) To install matplotlib library, we can use the
(a) Both Aand R are true and R is the correct explanation of A.
(b) Both Aand R are true but R is not the correct explanation of A.
(c) Ais true but R is false.
(d) A is false but R is true.

SectionB 2)
Protocol (VolP). Also, explain its one advantage.
19. Define Voice over Internet
Or
Internet.
Explain any two uses of the
stored the data of all passengers in a table Travel(PNo
has command to display the name of the
20. Rashmi is a travel agent, she given the following
PName,TDate,Km, Coach). She has She is encountering an error
while executing the
travel date is in year 2016.
traveller whose
following query: 2016 FROM Travel:
SELECT PName, TDate WHERE TDate=
suggesting the
error and write the correct query by
Help her in identifying the reason of the
possible correction(s).
MOD)
the following queries using SUBSTR) and
21. Samadrita wants to find the outputs of 2]
functions. Help her tofind the outputs.
(i) SELECT SUBSTR ("testcases", -5,3);
(ii) SELECT MOD (17.7,3);
the correct code and underline
22. The Python code written below has syntactical errors. Rewrite [21
the corrections made.
import pandas as pd
datal = {'ID': [1, 2. 3]. 'Name': ['Riya', Preeti', 'Neeta']}
data2 = {'ID': [3. 4. 5]. ' Age' [22. 30, 40]}
df1 = Pd.DataFrame (data l1)
df2 = Pd.DataFrame (data2)
result = Pd.merge (dfl, df2, on='ID', how=inner)
print (result)

23. Intellectural property right means that the person who produces the information is the only one
who can use that information. Now, explain the need of protecting intellectual property rights.2)
24. Answer the following questions based on the Series given below 2)
import pandas as pd
listl=[1.2,3,4,5.6.7.8]
list2-['swimning','tt', 'skating'."kho kho". "bb'. chess".football."cricket']
school=pd. Series (1istl, index=1ist2)
What will be the output of the following statements?
(a) print (schoo]*2)
(b) print (school["tt"])
fiample Paper7
OMge Proficiency Level 93

e
piven
deplayihe esulng I'yho code to coneaterte the DatafFranes dff and df2 vertically and
Datalame
Datatr
resultar
printesult dr

SectionC
Consider the given table Order 131

Orderno Orderdate
Table:Order
12/02/2008
CName Cloe Grdersin) Paymerts (in )
Avlon Delhi 100000 90000
21/11/2008
15/10/2008
Parason Jaipur 230000 230000
Tndert Raipur 120000 100000
13/01/2008 Avlon Jaipur 240000 240000
17/07/2008 Trident 310000
Delhi 340000
16/06/2008 Nalco Chennai 140000 140000

Write the SQL statements for the following based on above table Order.
(0) Display the maximum and minimum orders placed for each city.
(i) Find the average of Payments received by Cloc Jaipur.
(ii) List allorders given between 01/01/2008 to 12/10/2008.
Or
Which typeof MySQL function accepts only numerícvalues? What is the use of such functions?
Give the name of some functions of that type.
headings from the list
27. Write a Python code to create a DataFrame with appropriate column [3]
given below:
Akram'
[PO1,'Sachin Tendulkar','India'],[P02, Brian Lara',' West Indies'], [(P03, Wasim
'Pakistan'],[P04, AdamGilchrist','Australia|]|
code to create a pandas Series 'SI', as shown
28. Pushp, astudent of Class XII, has been assigned a [3]
below.
100
b 200
C 300
d 400
e 500
dtype: int64
statements for the following.
Help him to write the Python
the index c'.
) To extract the value with
adding 10 in each value.
) Display the series by
index 'd'.
W) Delete the value against
94 OStage I
Proficiency Level Informatics Practices Class
29. Sumit has to prepare a project on "Swachh Bharat Shreshth Bharat". He decides
information from the Internet. He downloads three web pages (webpage 1,
webpage3) containing information
1. He reads a on the given topic.
paragraph from webpage1 and rephrased it in his own words. He finally paste
the rephrased
webpage)
2. He paragraph in his project.
downloaded
images.
three images from webpage2. He made a collage for his project using thes
3. He also an icon from webpage3 and pasted it on the front page of his
report.
downloaded projec
Now, answer the following questions based on above reading.
)) Step 1 an example of
(ii) Step 3 an act of
(iii) The process of getting web pages, images and files from a web server to local computer i
called
Or What is cyber stalking? Is cyber stalking a crime? How cyber stalking messages are differen
from ordinary spam?
30. Consider the following table BOOK.
Table: B0OK

Code Title Author Publication Price


DO01 Physics Vikas Sharma 250
DO02 Chemistry Preeti Goyal 300
DO03 Computer Science Swati Rana Z2Z 275
DO04 English Sanjeev Jain aaa 150
DO05 Mathematics Rajv Rastogi bbb 400

Give the output of the following SQL commands on the basis of the above table BOOK.
() SELECT LEFT(Publ icati on, 1) FROM BO0OK WHERE Price>280;
(ii) SELECT LCASE(Author ) FROM BOOK :
(ii) SELECT SUBSTR (Title, 2. 3) FROM BOOK WHERE Code - DO02 :

SectionD
31. Army hospital Patna maintains the following table for its patients. They want certain outputs
department wise - like the average charges, total number of patients department wise etc. Asa
database programmer, helps them to get the required outputs.
Table: Hospital
Patld Pname Dept Charges
P01 Amit ENT 5600
P02 Sunil
Eye 7000
PO3 Rina Ortho 2500
P04 Akash Ortho 9000
PO5 Amitabh ENT 4000
P06 Preeti Ortho 5000
iSucoeed Sample Paper 7
O
Stage if Proficiency Level 95

(i)
Display each
Displaythe Dept and the total number of
(ii) department
Displaythe total wise average patients in each.
(iv) Display the number of unique Charges.
32. Ms. Jennifer
minimum Charges amongdepart ments.whose name starts
patients with "S" or "R".,
with it. Christiano wants to create a DataFrame "Football" and
perform some operations
41
Index Football
Player Club
1
Ronaldo AC Milan
Charges
Pele 9.6
Real Madrid 10.5
Maradona Royal Argentina 19.5
(Assume pandas is
(a) Write the outputimported
as pd)
for the
() Football['Charges' ]V2 following:
(i) Football.size
(b) Help her to write the code for
the
To set the index as 'R,'P and 'M', following:
(c) To change index Label of respectively for the three rows.
Football from 0 to Zero and 1to One.
Or (Option for part (c) only)
To make all the charges to 11.9

Section E
33. Carefully, observe the following table
named'Stock'. 5]
Table: Stock
Pid PName Category Qty Price
1
Keyboard t IO0ber 15 450
2 Mouse o s i 10 350
Wifi-router NW 5 2600
4 Switch NW 3 3000
5 Monitor 10 4500
6 Printer 17000

Write SQL queries for the following


) To display the records in decreasing order of Price.
(i) To display Category and category wise total Quantities of products.
(ii) To display the Category and its average Price.
(iv) To display Category and category wise highest Price of the products.
(V) To display product names of the items with price below 200 and quantity less than 5.
Or

Briefly explain the purpose of the following SQL functions.


) POWER) (ii) MOD)
(ii) NOW) (iv) MONTH)
(v) LENGTH)
Informatics Practices
96 OStage i Proficiency Level Class 2
at
set up its
main centre
34. "Anutulya Creations"-A start-up fashion house has supplying activities. It has 4
Kanpur, Uta
Pradesh for its dress designing, production and dress blocks 15o
buildings:
A
(ADMIN)
BLOCK

(PRODUCTON)/
(DESIGN) BLOCK
BLOCK

(SUPPLY)
BLOCK,

various blocks:
Distance between the
50 m
A to D 60 m
Ato P 110 m
A to S 60 m
Dto S 50 m
P to S
150 m
P toD
each block:
Number of computers in
20
Block A
80
Block D
15
Block P
Block S
answer the following questions.
Based on the above specifications, we interconnect
LAN, WAN and MAN, what type of network will be formed, if
(i) Out of
different computers of the campus? Justify.
which should be used to efficiently connect various blocks of buildings
(i) Suggest the topology, communication.
within Kanpur centre for fast
Also, draw the cable layout for the same.
with justification.
(iii) Suggest the placement of the following device
(a) Repeater (b) Switch/Hub
(iv) Now-a-days, video-conferencing software is being used frequently by the company to discus
software.
the product details with the clients. Name any one video conferencing
software.
Also, mention the protocol which is used internally in video conferencing
suitable reason.
(v) Suggest the suitable place (BLOCK) to house the server, with a
35. Write a Pandas program to sort the DataFrame first by Name in descending order, then b)
'Score' in ascending order.
Sample DataFrame :
exam_data-('Name':['Abhi','Chirag','Tarun','Anjali',Mahi','Tushar', 'Shubham'
"Harsh', Vanshika, 'Kartik
'Score':[12.5.9, 16.5,np.NaN,9,20,14.5, np. NaN,8,19].
'Attempts':[1,3.2,3,2,3.1,1,2,1].
'Qualify':[ Yes', 'No'.Yes.'No', No.'Yes.'Yes', 'No','No',Yes'I}
labels=['a'. 'b'.'c','d'.'e','f'.'g'.'h',i'.'j]
Sueceed Sample Paper 7 OStage ll Proficiency Level 97

Or Pvthonprovides the facility to draw


made multiple bar multiple bar charts in: same plot. Shrey used this feature and
him to wTite the charts in same plot but by mistake the code of graph has deleted. Now, help
code of given graph.
Multiple Bar Chart
60
ABoys (Red)
50 Girls (Blue)
Scores
40

30

20

10

G G3 G4 G
Person

Hints &Solutions
1. (d) active digital footprints
2. (a) Complain the cyber crime cell
3. a) Should be same as number of indexes
4. (a) Renting
5. (a) DATE()
6. (d) getdata()
7. (b) Keeping the usable components dispose the unused parts to an e-Waste recycler
8. (b) DataFrame
9. (d) All of these
10. (b) 3
11. (b) Linux
12. (c) Both (a) and (b)
13. (c) Utilities that filter the entry of malwares
14. (a) mysql >SELECT LENGTH(CNAME) FROM Customers;
15. (a) GROUP BY
16. (c) RTRIMO
17. (b) Both Aand R are true but R is not the correct explanation of A.
18. (b) Both Aand Rare true but Ris not the correct explanation of A.
19. VolP (Voice over Internet Protocol) is an lP telephony term for a set of facilities used to manage the delivery of voice
information Over Internet. It enables a user to make cheap telephone calls over abroadband Internet connection, instead
of using aregular telephone service. Amajor advantage of VolP is that avoids the tolls charged by ordinary telephone
service.
Or
Iwo uses of Internet are as follows:
) Electronic Mail (E-mail) The first major use of the Internet is E-mail., People used E-mail for sharing information, data
and any other files instantaneously with others. This had enabled
Tiles, photos, vide0s, business communications
Taster communication between people and improve business efficiency.
98 OStage I Proficiency Level Informatics Practices Class

() E-commerce The Internet enables the selling of goods and services in online Iode. There are many E-cOmmere
market and sel
products/services available in the
platform vendors like Amazon, Ola who aggregate several
through their portal to customers.
20. SELECT PName, TDate FROM Travel WHERE YEAR(TDate)=2010:
21.. (0 +
SELECT SUBSTR("testcases", -5, 3)!
extracts
I Cas
Here, thefunction charac
characters froma string.
4 +

The SUBSTRO function extracts certain number of


characters from the right.
Starting from position - 5 and then 3
(G0)
SELECT MOD (17.7, 3)
i 2.7
the remainder of division.
The MODO function returns
Neeta']}
22. import pandas as pd
3]. 'Name': [ 'Riya', 'Preeti ',
datal = {ID': [l, 2. 30, 40]}
4, 5]. 'Age': [22.
data2 = {ID': [3.,(datal)
dfl = pd. DataFrame
(data2)
df2 = pd. DataFrame how='inner )
df2, on='ID',
result = pd.merge(dfl,
print (result)
of protecting them,
intellectual property rights must be protected because applications, as well as impro
23. The
business to create new software and new software
() encourages individuals and
existing applications.
technologies are widely distributed.
(i) ensures new ideas and
national economy.
(i) promotes investment in the
24. (a) 2
Swimming
tt
skating 6
kho kho
bb 10
chess 12
football 14
cricket 16

(b) tt 2

25. import pandas as pd


dfl = pd.DataFrame(f'A': [1, 2. 3]. 'B': [4. 5, 6]})
df2 = pd.DataFrame({'A': [7, 8, 9]. 'B': [10. 11, 121))
result df = pd.concat ([dfl. df2]. axis=0)
print (result df)
26. (0) SELECT C10c, MAX(Orders), MIN(Orders) FROM Order GROUP BY Cloc:
() SELECT AVG(Payments) FROM Order WHERE Cl0c='Jaipur':
() SELECT * FROM Order WHERE Orderdate>"01/01/2008' and Orderdate<"12/10/2008':
Or
Mathematical functions accept only numeric values and return the value of same type, These functions are
perform mathematical operations on the database data.
Some mathematical functions are: POWER(),
ROUND(), TRUNCATE().
iSucceed Sample Paper 7 oStoge il Proficiency Level 99

pd
27. import pandas as
data = ("PID" :"POI", "PO2", "PO3", "P04").
"Pname": ["Sachin Tendulkar", "Brian Lara", "Wasim Akram". "Adam Gil christ"].
"Country": ('India". "West Indies, "Pakistan "Austral ia")}
df pd.DataFrame(data)
print(df)
['c'))
28. (0 print(S1 (1) print(S1+10)
(i) Sl=Sl.drop[ 'd']
29. (0 Paraphrasing (i) Copyright infringement
(i) Downloading
Or Yes, cyber stalking is a crime in which the attacker harasses a victim using electronic communication, such as E-mail or
Instant Messaging (IM), or messages posted to a website or a discussion group. Cyber stalking messages differ from
ordinary spam in that a cyber stalker targets a specific victim with often threatening messages.
30. (0 LEFT (Publication, 1)
b

LCASE (Authon)
vikas sharma
preeti goyal
swatirana
sanjeev jain
rajiv rastogi
SUBSTR (Title, 2,3)
hem

Common Students think that index is started from 0 while index is started from 1.
Mistake

31. 0) SELECT Dept, COUNT(*) FROM Hospital GROUP BY Dept;


(i) SELECT Dept, AVG(Charges) FROM Hospital GROUP BY Dept:
(i) SELECT COUNT(DISTINCT Dept) FROM Hospital;
(iv) SELECT MIN(Charges) FROM Hospital WHERE Pname LIKE "S%" OR Pname LIKE "R3":
32. (a) (0) 0 4.80
1 5.25
2 9.75
(i) 9
(b) Football=Football.rei ndex ([ 'R',P', 'M])
inpl ace = True)
(c) Football.rename (index = (0 : 'Zero, 1: 'One', 2:'Two'},
Or
Football['Charges' ]=l1.9
33. (0) SELECT * FROM Stock ORDER BY Price DESC;
) SELECT Category, SUM(Qty) FROM Stock GROUP BY Category:
Category;
(i) SELECT Category, AVG( Price) FROM Stock GROUP BY
Category:
(V) SELECT Category, MAX(Price) FROM Stock GROUP BY
(V) SELECT PName FROM Stock WHERE Price<2000 and Qty<5;
Or
number raised to the power of another number.
) POWER)function returns the value of a
dividing by another number.
() MOD() function returns the remainder of a number
(n) NOW() function returns the system date and time.
() MONTHO function extracts the month part of a date.
(M LENGTH) function returns the length of a string value.
Informatics Practices Classn
100 O
Stage I Proficiency Level
areathat spans for
systems spreadin asmall
34. 0 ALAN network is formed. LAN or Local Area Networkis arnetwork of maximum 150 m.
the offices are
500 mto 1km approx. Here, the distance between
() Star topology should be used.
Cable layout 'A
(ADMIN)
BLOCK
p'
'D (PRODUCTION)/
(DESIGN) BLOCK
BLOCK

(SUPPL) respectively,a
BLOCK
blocks are 110 mand 150 m repeate
distances between the
to D. Since, the
(i) (a) RepeaterrAto S and P the signals.
amplify mutiple computers
present in them.
required to connect
willbe the buildings to
Switch/Hub It willbe reguired in all Google Meet, MS Teams.
(b)
conferencing softwares Zoom, maximum number of comn#
(V) Video Internet Protocol). because it has
Protocol VolP (Voice over BLOCK) to house the serveris BLOCK D,
place (i.e.
(v) The mostsuitable
pd Mahi'. Tushar
35. import pandas asnp Tarun', 'Anjali','Shubham, 'Harsh' 'Vanshika'. Kartik1
import numpy as ['Abhi', 'Chirag',
exam data = {'Name':
14.5, np. NaN, 8, 19].
[12.5, 9. 16.5, np. NaN, 9. 20,
'Score': 1].
'Attempts: [1, 3. 2. 3. 2. 3. 1, 1,.2.
'No', 'No, Yes' Yes, 'No, No. Yes']}
Yes',
Qualify': [Yes'. 'No. j]
['a', b', 'c', 'd'. 'e', 'f, 'g'. h', 'i',
labels = data index=labels)
(exam
df = pd. DataFrame
print ("Orginal rows:")
True])
print (df)
values (by=[ Name'. 'Score]. ascending=[False, by Score in ascending
order:")
result-df.sort descending order, then
'Name' in
print("Sort the DataFrame first by
print (result)
Or import numpy as np
import matplotlib. pyplot as plt
groups =5
boys = (45, 23,62. 16.33)
girls = (55,18,31,46, 29)
fig. ax = plt.subplots ()
index = np.arange(groups)
bar width = 0.35
opacity = 0.8
width,
rectsl = plt.bar(index, boys, bar
alpha=opacity.
color='Red',
label= Boys')
girls, bar width,
rects2 = plt.bar(index + bar width,
alpha=opacity,
color='Blue'.
label='Girls')
plt.xlabel(´Person')
plt.ylabel("Scores')
plt.title('Multiple Bar Chart')
G5'))
plt.xticks(index + bar width, ('G1, 'G2, G3, 'G4',
plt.legend()
plt.tight layout()
plt.show()
Proficiency Building Zone
OStageIl Proficiency Level

SAMPLE (With Solutions at the end of paper)

QUESTION PAPER 8
Informatics Practices
Instructions
1 This
question paper contains five sections, Time:3 hrs Max. Marks: 70
2 All
questions are Section to E.
A
7 Section Ahas 18 compulsory.
4 Section Bhas 07 questions carrying 01 mark each.
Very Short Answer type
5. Section C has 05 questions carrying 02 marks eacr.
Short Answer type questions
6 Section D has 02 carrying 03 marks eacn.
7 Section Ehas 03
questions carrying 04 marks each.
questions carrying 05 marks each.
8. Allprogramming questions are to be
answered using Python Language only.
ISection A
1 Which of the following is not a type of Cyber crime? (1]
(a) Data theft
(b) Forgery of online documents
(c) Damage to data and systems (d) Installing antivirus for protection
2. A/An is a unique data trace of a user's activities, actions,
transactions in digital media. communications or
[1]
(a) digital handprint (b) digital footprint
(c) offline footprint (d) offline handprint
3. Pandas series is
[1]
(a) two dimensional (b) three dimensional
(c) one dimensional (d) multi-dimensional
4 are the impact of e-Waste on the environment. [1)
(a) Soil polution (b) Water pollution (c) Air polution (d) Sound pollution

5. The AVGÌ function in MySQL is an example of [1]


(a) MATHO) function (b) TEXT)function
(c) DATE) function 6d) Aggregate function
Informatics Practices Class2
102 OStage Il Proficiency Level

custonisation of charts in Python?


6. Out of the following, which function cannot be used for
(a)xlabel0 (b) color)
(c) title) (d) xticks)

7. F in FOSS stands for


(b)Forever
(a) Free
(d)Freezing
(c) Fire
column namne. In case
the Data Frame, we can specify the
8. While accessing the column from error it willraise?
column does not exist,which type of (c) Nane error
(d)Runtime error
(b)Syntax error interconnected L
(a) Key error hardware
independent computers and other
9. is acollection of
communication channels. (d) None of these
(b) Networking (c) Sharing
(a) Computer
Table: DEPARTMENT
10. PLACE
DEPTNAME
DEPT CODE MUMBAI
CSE KOLKATA
DO1
D02 DELHI
MEDIA MUMBAI
D04
HR
DO3 DELHI
SALES
DO5
following statement.
Write the output of the
DEPTNAME ) FROM DEPARTMENT;
SELECT COUNT(DISTINCT (c) 3
(d)Error
(b) 4
(a) 5
demodulation is performed by
11. Modulation and (c) modem (d) gateway
(a) microwave (b) satellite
command?
the output of following SQL
it was Monday, what will be
12. If on 1990-01-22',('1990-01-22'
SELECT dayname ) +1;
(c)7 (d) Monday
(a) Error (b) 1
violation of IPR?
13. Which of the following is not a (b) Copyright infringement
(a) Plagiarism d) Trademark infringement
(c) Patent
tabe
Reena and Zebiare getting the following output of SELECT statement on a
14. In MySQL,
Employee.
i Reena Zebi

Lucknow LucknoW
bo Delhi Delhi
| Mumbai Mumbai
Delhi Kanpur
Kanpur
Delhi

Which keyword has Zebi used with a SELECT statement to get the above output?
(a) COUNT (b) UNIQUE (c) DISTINCT (d) All of these
1Sncceed Sample Paper 8
OStage I Proficiency Level 103
Consider the
15.
SELECT *
following query
FROM employee |1]
ORDER BY salary
To display the salary from name

following options should be greater to smaller and name in alphabetical order which of the
(a) Ascending, Descending used ?
(c) Desc, Asc (b) Asc, Desc
(d) Descending, Ascending
16. In which function, NULL values
(a) SUM) are excluded from the result returned? [1]
(b) MAX0
(c) MINO (d) All of these
Directions(Q.Nos. 17-18) Assertion and
Reason based Questions.
17. Assertion (A) The bus
Reason(R) In a bus
topology is prone to data collisions. [1

data collisions when topology,


two
all devices share the
same communication medium, leading to
(a) BothAand Rare True devices transmit data simultaneously.
and R is the correct
(h) Both Aand Rare True and R explanation of A.
is the not correct
(c) A is true but R is False. explanation ot A.
(d) Ais False but R is true.

18. Assertion (A) Elements of Series can be


accessed using positional
Reason (R) Positional index values ranges from 1to n, if n is the index.
[1]

(a) Both Aand R are true and R is the size of the series.
correct explanation of A.
(b) Both Aand R are ture but R is not the
correct explanation of A
(c) A is true but R is false.
(d) Ais false but R is true.

SectionB
19. Navya has just created a website for her company and now need to host it. Briefly discuss the
role of a web server in hosting a website. [2]
Or
Write one advantage each of star and bus topology used in networking. Draw a network layout
of bus topology to connect six computers.

20. Mr. Roy is a manager in ahotel and wants to find out some data from atable, where he maintains
the hotel records. He is not very expert with SQL commands and functions. Help him to write
the queries. [2]
Table: Hotel
Roomld CName RoomType DtofArrival Charges
R1 Ritesh AO 2016-09-09 1800
R2 Suman Deluxe 2020-08-01 2000
R3 Abhi General 1995-04-05 3000
R4 Ram AC 1994-02-02 2500
R5 Nitin Deluxe NULL 7000

() Display count of the different room types from the table Hotel.
) Display the average room charges of "AC" rooms.
Informatics Practices Class2
104 oStoge Proflclency Level
ORDER
in MySQL? How is it different Irom By
21. What is the purpose of GROUP BY clause 12
clause? and
22. The Python code written below has
syntactical errors, Rewrite the correct code underline
the corrections made.
import pandas as pd [25, 30, 22])
data (Name ['Riya Preeti', 'Neeta']. 'Age':
df pd. Dataframe (Data)
for row in df:
print(roOw) 12
your data.
C3. What is data protection? List two ways to protect
12
given code?
24. What will be the output of the
import pandas as pd 'charu', deepika ', 'era'])
([1,2,3,4,5], index=['akram ', 'brijesh',
S- pd. Series
print (s['charu'])
Series from a scalar value '10' and display the
25. Complete the given Python code: Create a pandas
elements of the Series.
last 3
import as pd
series data = pd. Series (
print(series data.

Section C
which are based on the table Student given below:[3
26. Write a output for SQL queries (i) to (iii),
Table : Student
Gender City Marks
RollNo Name Class DOB
06-06-1995 M Agra 551
1 Nanda X
XI 07-05-1993 Mumbai 462
2 Saurabh
X 06-05-1994 F Delhi 400
Sonal
08-08-1995 Mumbai 450
4 Trisla XIl
5 Sohan Xl 08-10-1995 M Delhi 369
6 Marisla X 12-12-1994 F Dubai 250
7 Neha 08-12-1995 MoscoW 377
8 Nishant 12-06-1995 M Moscow 489

) SELECT cOUNT(*), City FROM Student GROUP BY City HAVING COUNT(*) >1 ;:
(i) SELECT MAX(DOB),MIN(DOB ) FROM Student;
(ii) SELECT NAME,GENDER FROM Student WHERE City= "Delhi";
27. Rahul has written a code with a DataFrame and a CSV file "Emp.csv" containing records 0
employees as follows: (3
Index Eno Ename Eage Esal
Ritesh 15 5600
1 Aakash 16 17000
3 Sumit 17 12500
4 Ria 20 18000

Write the Python code to read the data from the CSV file, display its first two records and the
rewrite thedata to a new CSV file
Level 105
Succeed Sample Paper 8 OStagei Proficiency

3)
28.
Given a DataFrame 'df' created as :
Index Roll Name Marks
1 Ravi 56
2 Sheeta 77
3
Paromita 89
Debarati 98

Write the Python statements to :


(i) Get the output as"2 Paromita".
(ii) Change the index order to 2,1,0.
(ii) See the data type of the Marks' column.
[3]
29. List the guidelines to avoid plagiarism.
Or
What are the psychological problems related to the usage of technology?
statements.
30. Consider the following table Games, Write SOL COmmands for the following [3]
Table: Games
ScheduleDate
GCode GameName Type Number PrizeMoney
5000 23/01/2004
101 Carom Board Indoor 2
12000 12/12/2003
102 Badminton Outdoor 2
14/02/2004
103 Table Tennis Indoor 4 8000
9000 01/01/2004
105 Chess Indoor 2
Lawn Tennis Outdoor 4 25000 19/03/2004
108
PrizeMoney more than 7000.
(i) Todisplay the details of those Games,which are having
(i) To display sum of PrizeMoney for each Type of Games.
table Games.
(ii) To display the total number of games available in the above
following statements, but is not able to
Naina works for M/s Anish Steels Ltd. She has written produce the outputs.
understand the outputs. Explain her the working of these statements and
(i) SELECT INSTR('computersci ence','sc');
(i) SELECT MID('funandfood',3,4);
(iii) SELECT ROUND(1334.99);

Section D [4]
31. Consider the table given below and answer the questions
Table: EMP
DOB DOJ DEPTCODE
ENAME SEX
EMPNO 1990-05-02 2012-01-02 D01
M
101 Ram 2013-02-04 DO3
1992-03-01
102 Aman 2011-01-06 D04
F 1989-01-04
103 Diya M 1993-04-06 2015-01-03 DO2
106 Sandeep 2014-02-04 D05
M 1995-07-08
105 Varun 2013-03-06 D01
F 1994-03-02
107 Komal 2012-02-07 DO1
F 1995-02-01
Priyanka
104 MPNO
EMPNO, ENAME, SEX from the table EMP in descending order of
() To display
female employee from the table EMP.
(ü) To display the records of all
106 OStage I Proficiency Level Informatics Practices Class12

(ii) To display the EMPNO and ENAME ofthose employeesfrom the table EMP who are joined
between '2011-01-01' and '2013-01-01'.
(IV) To count the number of male emplovees who have born before "1994-01-01.
OG. Jacqueline has created the following Data Frame consisting of data of houses ot a school and s.
certain operation on th
number of boys in the houses. shown asfollows. She wants to perform
data set. Help her with the correct actions. 14
House
Index Housename Location Boys
East 20
Ganga
West 80
1 Yamuna
Saraswati North 56
2

(a) What willbe the output of the following code?


(i) print (House. shape )
(ii) House.pop ("Locati on")
print (House)
DataFrame. What statement she
(b) She wants the Housename""column to be the index of the
should write?
(c) To display total number of elements in the dataframe.
Or (Option for part (c) only)
She wants to see the number of columns. Write the statement which will display the number
of columns.

SectionE
33. Given below a table Bookhouse, write SQL query for part (i) to (v).
Table: Bookhouse
Title Author Subject Publisher Qty Pricell
o1 Data Structure Lips chute DS McGraw 4 217.00
DOS Guide Nortron OS PHI 175.00
Turbo C++ Robort Lafore Prog Galgotia 5 270.00
4 Dbase Dummies Palmer DBMS PustakM 7 130.00
5 Mastering Windows Cowart OS BPB 1 225.00
Computer Studies French FND Galgotia 2 75.00
7 COBOL Stern Prog John W 4 1000.00
8 Guide Network Freed NET Zpress 200.00
9 Basic for Beginners Norton Prog BPB 40.00
10 Advanced Pascal Schildt Prog McGraw 4 350.00
() Display Publisher wise total stock value (Oty * Price).
(ii) Display Title of the book which is costliest.
(ii) Display number of books and total Price for each
type of Publisher.
(iv) Display all the books where subject starts with
"D" and Qty is less than 3.
(v) Display all information of books
whose Price starts with 2.
SucceedSample Paper 8
OStage Proficiency Level 107

Write the uses of Or


() MID following MySQL
(ii) LEFTO functions with one example of each.
(iv) LCASE) (iii) TRIM)
(v) MAX)
34. China Middleton Fashion is planningto
provide
infrastructure
The company has
for
distribution ofexpand
their
their networkin India, starting withtwo cities to
products. 15)
have nanmed their planned to
offices as setup their main office in Chennai at three different locations and
Corporate Unit in Delhi. Production Unit, Finance Unit and Media Unit. The cornpany has its
Arough layout of the
same is as follows:
India
Chennai
[Corporate
Unit [Delhil
Production
Unit

Financel
Unit
Media
Unit

Approximate distance between these units is as follows:


From
To Distance
Production Unit
Finance Unit 70m
Production Unit Media Unit 15 m
Production Unit Corporate Unit 2112 m
Finance Unit Media Unit 15 m
In continuation of the above, the
company experts have planned to install the following number
of computers in each of these units.
To
Distance
Production Unit 150
Finance Unit
Media Unit
Corporate Unit
35
10
30
eoihilo28aniH
() Suggest the kind of network required (out of
units.
LAN, MAN, WAN) for each of the following
(a) Production Unit and Media Unit
(b) Production Unit and Finance Unit
(ii) Which of the following devices will you suggest for connecting all
their office units? computers with each of
(a) Switch/Hub (b) Modem (c) Telephone
(m) Suggest a cable/wiring layout for connecting the company's local office units located in
Chennai.
V) After setting up the lab and Internet in the lab, company now requires to enable videos and
animations to be played on the web browser for it's employees. Which browser tool /service
can be used for the same?
(") Give an example of Open Source web browser.
Informatics Practices Class
108 OStage I Proficiency Level

35. Write the Python code for the following ggraph which display the different style multiline in same
plot.
Plot with different styles
Line 1-dotted
ommn Line 2-dashed
35

30

25

20

15

10
22.5 25.0 27.5 30.0
10.0 12.5 15.0 17.5 20.0
Xaxis

Or
Python code to get the output.
Observe the below figure and write the
First Bar Graph

80
y-axis
60

40

201

4
X-axis

Hints &Solutions
2. (b) digital footprint 3. (c) one dimensional
1. (d) Installing antivirus for protection
4. (d) Sound pollution 5. (d) Aggregate function 6. (b) color()
7. (a) Free 8. (a) Key error 9. (b) Networking 10. (a) 5
11. (c) modem 12. (b)1 d 13. (c) Patent 14. (c) DISTINCT
15. (c) Desc, Asc 16. (d) Allof these
17. (a) Both Aand R are true and R is the correct explanation of A.
it ranges
18. (c) Elements of the series can be accessed using positional index, positional index values start from0 and
0 to n-1, if n is the size of the series. Hence, Ais true but Ris false.
19. Aweb server is the residence of web pages. It is also the agent that fetches the web pages whern the webpn and
requested by clients. The main job of a web server is to display website content through storing. procesdi
delivering web pages to users. Allcomputers that host websites must have web server software. Web servers ale
web hosting or the hosting of data for websites and web-based applications or web applications.
SucceedSample Paper 8 109
OStage I Proficiency Level

Advantage of star topology is that it is most reliable as there is a direct Cconnection of every node with the central node or
server.
Advantage ofibus topology isthat all nodes are connectedthrough a single length of acable, so very short cable length
is used.
Anetworklayout of bus topology to
connect six computers is as follows:
Node

Terminator Terminator

o0 0 SELECT COUNT(DISTINCT RoomType) FROM Hotel;


(m SELECT AVG(Charges)
FROM Hotel WHERE RoomType-AC";
21. The GROUP BY clause carn be used to combineallthose records that have identical value inaparticular tieid o
fields.
agop
Whereas, ORDER BY clause is used to display the records either in ascending or descending order based on a parucula
field. For ascending order, ASC is used and for descending order DESC is used. The default order is ascending order.
22. Correct code is:
import pandas as pd
data = {" Name: ['Riya', Preeti', 'Neeta'1. 'Age': [25. 30, 22])
df = pd.DataFrame (data)
for index, row in df.iterrows ():
print(row)
23. Data protection refers to the practices, safequards and binding rules that ensure protection of sensitive and personal
information.
Two ways of data protection are as follows:
() By data encryption
() Not opening phishing E-mails
24. The code print(s[charu]) prints the value at
index 'charu' which is 3.
25. Code is
import pandas as pd
series data = pd. Series (10)
print(series data.tail(3))
26. (0
cOUNT(*) City
Mumba
2 Delhi
2 MoscoW

()
MAX( D0B ) MIN(DOB)

i08-12-1995 07-05-1993
Informatics Practices Cas

ProficiencyLevel
110 OStagei

(i) + Gender !
Name

Sonal
M
Sohan maximum
consider as
which will be
in date
sometimeconfused interchangeably.
Common Studentsminimum DOB. Theywrote
Mistake DOB or

27. import pandas as pd"C:\\Data\\Emp. csv')


empdf=pd.read_csv(
empdf. head(2) \Data\\Empnew.csv')
empdf. tocsv('C:
'Name']
28. 0 df, loc[2: , [2,1,0])
() df.reindex(
() df["Marks'].dtype own languagelu
quidelines to avoid
plagiarism:
book as it iS, try to put t is your
unintenio
the
29. Follow the below
plagiarism, instead of
copying the language of
consequences, so thatnooneperformit
its also merk
0 To avoid understanding of plagiarismand forget enclosingit is quotesand
clear do not
() One should havea else's workin ourtask, word for word, then
(i) Ifcopying
someone credit for its VOUrsaF
task and not taking
for your
SOurce.
author has write which was useful
(v) Another way is to credit the Or
to the usage of technology information is ae
psychological problems related the web and checking what
There are some for one's own name on
) Egosurfing An illness of regularly reaching
own on the net. describes the state of "trying to quiet hungst
about one's pornography and information,
Infornography The word, derived from
() information on the net". known by everybody.
information online that should not be herself knownt
(i) Blog streaking Adesire
to spread
videos in order to introduce and make himself or
constantly uploadingone's own
(iv) Youtube egoism
acquaintances in the web.
others.
to get information about all his or her relatives or
(V) Google stalking trying
photoalbums of others' on the net.
(vi) Photo lurking Looking at the own writings, and rels
the internetencyclopedia, wikipedia, sending someone's
(vi) Wikipedia holism Contributing to
the present texts.
PrizeMoney > 7000;
30. ) SELECT*FROM Games WHERE
SUM(PrizeMoney ), Type FROM Games GROUP BY Type;
() SELECT
FROM Games:
(i) SELECT COUNT(GameName) Or
-+
INSTR('computerscience', 'sc')i

(1) MID(' funand food', 3,4)


nand

+
(i) ROUND(1334.99)

1 1335
Succeed Sample Paper 8
OStage i Proficiency Level 111

31. 0 SELECT EMPNO, ENAME, SEX FROM EMP


SELECT * FROM EMP WHERE SEX ORDER BY EMPNO DESC:
(ii) SELECT EMPNO, ENAME F':
(v) SELECT
FROM EMP WHERE D0J BETWEEN '2011-01-01' AND
32. (a) () (3,3)
COUNT(EMPNO FROM EMP
)
WHERE SEX= 'M' AND DOJ <1994-01-01':
2013-01-01';

(i)
Index House
Housename Boys
1 Ganga 20
Yamuna
Saraswati
30
56
b House.set_index('Housename ')
(c) House.size

len(House.columns)
33. 0 SELECT PuDlisher, Qty*Price AS Total Stock Value FROM
Gi) SELECT Title FROM Bookhouse WHERE Bookhouse GROUP BY Publisher;
Price-MAX
i) SELECT COUNT(*), SUM(Price) FROM Bookhouse (Price);
GROUP BY Publisher;
iv) SELECT Title FROM Bookhouse WHERE Subiect LIKE D%
AND Qty<3;
v SELECT * FROM Bookhouse WHERE Price LIKE 2% ;

0) MID)This funcion returns a substring of the specified length starting from the specified position.
e.g. SELECT MID('HELLO.3):
Output
MID("HELLO',3 )
; LLO

(i) LEFT() This funcion returns the left most number of characters as specified.
e.g. SELECT LEFT('HELLO',1);
Output
LEFT("HELLO',1)

from the middle.


(i) TRIM) It removes any extra spaces from right and left of a string but not
e.g. SELECT TRIM( Zebra crossing );
Output
TRIM ( Zebra crossing )!

|Zebra crosssing

argument string to the lowercase characters.


(iv) LCASE 0 This function converts the characters of an
("Vowel"):
e.g. SELECT LCASE
Output
LCASE
VOwe
112 OStage II Proficiency Level Informatics Practices Class

(V) MAX)This function returns the laragest value from the selected
columns.
Syntax SELECT MAX(Column name) FROM table_name;
e.g. Write a query to display the maximam pay availed by the Coaches.
mysql> SELECT MAX (Pay) FROM Club:
34. (0 (a) The type of network between the Production Unit and Media Unit is LAN (Local Area Network).
Area Network).
eype of network between Production Unit and Finance Unit is MAN (Metropolitan
units is SWitch/nub.
") (a) ne suitable device for connecting all the computers within each of their office
(1) The cable/wiring layout for connection is as follows:

India Chennai
Producton
Unit

Corporate Finance
Unit (Delhi) Unit
Media Unit

web browe.
enable videos and animations to be played on the
(V) Add-ons browser tool/service can be used to
students of multimedia class.
(V) Google Chrome, Firefox.
35. import matplotlib.pyplot as plt
xl = [10,20,30]
yl = [20,40, 10]
X2 = [10,20,30]
y2 = [40, 10,30]
plt.xlabel('x - axis')
plt.ylabel ('y - axis')
e='dashed')
plt.plot (xl,yl, color='bl ack', linewidth = 5, label = linel-dotted',1inestyl
plt.plot (x2, y2, color='magenta ', linewidth = 3, label=line2-dashed', linestyle=dotted')
plt.title( "Plot with different styl es")
plt.legend()
plt.show()
Or
i mport numpy as np
i mport matplotlib.pyplot as plt
X=np. arange(5)
Y=[10,26,24,3,56]
plt.bar(X, Y)
plt.title( "First Bar Graph")
plt.ylim(0, 100)
plt.xlim(0, 10)
plt.xlabel ('x axis')
plt.ylabel ('y - axis ')
plt.xticks ([0, 2,4,6])
plt.yticks ([0, 20, 40,60, 80])
plt.show()

You might also like