NEW
Font size
Worksheets2021 Sample Paper 5 (TERM1)
Total questions: 55
Worksheet time: 55mins
A two-dimensional labelled data structure that is an ordered collection of columns to
store heterogeneous data is called
Series
Numpy Array
DataFrame
Panel
To check whether a series is empty or not, the attribute used is
empty
blank
isnull
isblank
To delete a dataframe column using drop() method , the minimum number of parameters required is
1
2
3
4
The pop() method can be used for :
Series
DataFrame
Both Series and DataFrame
None of the above
The axis parameter of the drop method while using it for dropping a column of a dataframe is :
Compulsory
Optional
Compulsory only for deleting 1st column
Compulsory only for deleting last column.
A series S1 is created as :
import pandas as p
s1=p.Series([1,2,3,4])
print(s1.hasnans)
will show :
True
False
1
None
Piya wanted to change the value of index 3 of a series s1 to 100, the statement will be :
s1.3=100
s1(3)=100
s1[3]=100
None
Rajan wanted to see all the values of a series school , which command(s) will do it :
school[0:]
school[:]
school.all
Both school[0:] and school[:]
The statement to create a series :
s1=pd.Series([1,2,3,4],index=[-4,-3,-2,-1]) is :
Is perfectly correct.
Negative indexes cannot be given for integer values.
Negative indexes can be given only for String values.
Negative indexes can be specified by a tuple only.
MathematicsMathematics
Mathematics Mathematics
ComputerScienceComputerScience
ComputerScienceComputerScience
ComputerScienceComputerScience
ComputerScienceComputerScience
dfrange=pd.DataFrame({‘Roll’:range(1,10,2),‘Marks’:range(1,10,2)})
The statement : print(df.size) will return :
8
9
10
11
A series “Pseries” is created with the values [1.6,numpy.NaN,8.9,10.5]
The output of the statement :
Pseries.hasnans
True
False
Nan
Null
A dataframe “frm” exists . The statement frm+2 will:
Update the dataframe permanently
Will add 2 to each value of the first column and display only
Will add 2 to each value of the dataframe and display , but no updation in the dataframe.
None of the above
Faculty.index
Faculty.size
Faculty.length
Faculty.values
Read the statements given below and identify the right option about Boolean indexing.
Statement A - In boolean indexing, boolean vectors can be used to reshape the data.
Statement B - DataFrame using Boolean indexes as True and False.
Statement A is correct.
Statement B is correct.
Statement A is correct but statement B is incorrect
Statement A is incorrect but statement B is correct
matplotlib allows you to create
Maps
Chart
Table
Infographics
A bar chart can have
same color in all bars
different colors in different bars
only white color
bar chart cannot be created using matplotlib
pyplot belongs to :
matplotlib library
Pandas library
Numpy library
None of these
The “figure” parameter of plot function is used to
change line color
change line style
change line thickness
the parameter does not exist
The color code ‘k’ represents ………… color.
Blue
Green
Black
Red
A figure/chart contains ………… .
Plotting Area
Legend
Axis Labels
All of the above
Value / Tick marks on y-axis line are called
ylabel
yvalues
yticks
ynums
A statement to display “Student Names” as x-axis title is :
plt.xtitle=“Student Names”
xlabel=“Student Names”
plt.xlabel(“Student Names”)
None of the above
The ………… attribute of bar chart specifies the width of the bars.
size
width
thickness
None of these
The parameter that changes the marker style in a line chart is
style
marker
mark
object
Riya wanted to change the width of the line in her line chart , the property that she should use
linewidth
width
changewidth
None of these
Which parameter changes the line style of a line chart?
linestyle
style
type
linetype
Statement A - Matplotlib plots can be saved file using matpolt().
Statement B - File name for saving a graph can be a full path, that also include a
particular file extension if desired.
Statement A is correct.
Statement B is correct
Statement A is correct but Statement B is incorrect.
Statement A is incorrect but Statement B is correct.
Any information created by us that exists in digital form is called
Digital footprint
Cyber print
Internet print
Web finger print
A fraudulent process that extracts money from an ignorant person is called
Spamming
Phishing
Bullying
None of these
The term Intellectual property rights cover
Trademark
Copyright
Patents
All of these
Using someone’s Twitter handle to post something will be termed as
Fraud
Identity theft
Online stealing
Phishing
In FOSS, source code is hidden from
All users
Purchaser
Only the vendor
In FOSS source code is not hidden.
Which of the following are medium of cyber trolling?
You tube video comments
All of these
Mr. Raghavendra found that after posting some images in social media , some people were writing negative messages. This is an instance of
Phishing
Trolling
Hacking
Spamming
Which of the following are health disorders caused by overuse of technology?
DNA damage
Lung cancer
Damage to heart liver and spleen
All of the above
Which of the following are not ways of data protection?
Using password
Using User IDs
Using encryption techniques
None of these
Anil never writes a subject line in his mails . This is an instance of :
Spamming
Phishing
Non obeying of E-mail etiquettes
Trolling
Sneha found that her picture posted in a social networking site has been merged with an unknown person and published. What should she do?
Ignore the instance
Report it to the cyber crime cell
Try to delete the posts
Enjoy the instance.
Which among the following are good preventive measures against health hazards of technology use?
Periodic walks between long usage of devices
Using screen guards
No overuse of technology
All of the above
Jack is a good programmer and wants to contribute to the features of one of the softwares , that he uses. What kind of software he can contribute to?
Proprietary software
Free software
Open source software
Shareware
Which among the following is not a possible activity of a virus?
Deleting data files
Sending bulk mails
Deleting system files
None of these
Statement A - Cyber crime involves the use of computer and network in attacking
computers and networks as well.
Statement B - Cyber bullying is an act of cyber law.
Statement A is correct.
Statement B is correct.
Statement A is correct but Statement B is incorrect.
Statement B is correct but Statement A is incorrect.
Choose the right code from the following for Statement 1.
pd
df
data
p
Choose the right code from the following for the Statement 2.
Dataframe
DataFrame
Series
Dictionary
Choose the correct statement/method for the required output:
(5,3)
df.index
df.shape()
df.shape
df.size
He wants to print the details of ‘‘January’’ month along with the number of passengers, identify
the correct statement.
Month Passengers
0 Jan 25
2 Jan 35
df.loc[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]
df[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]
df.iloc[[‘Month’,‘Passengers’]][df[‘Month’]==‘Jan’]
df([‘Month’,‘Passengers’])[df[‘Month’]==‘Jan’]
Identify the correct statement to change the index.
df.index[]=[“Air India”,“Indigo,“Spicejet”,“Jet”,“Emirates”]
df.index[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]
df.index=[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]
df.index()=[“Air India”,“Indigo”,“Spicejet”,“Jet”,“Emirates”]
Choose the right code from the following for Statement 1.
matplotlib as plt
pyplot as plt
matplotlib.pyplot as plt
matplotlib.plt as pyplot
Identify the name of the function that should be used in Statement 2 to plot the above graph.
line()
bar()
hist()
barh()
Choose the correct option for the Statement 3.
title(“Rating’’)
ytitle(‘‘Rating’’)
ylabel(‘‘Rating’’)
yaxis(‘‘Rating’’)
Choose the right function/method from the following for the Statement 4.
display()
print()
bar()
show()
In case Mr. Sharma wants to change the above plot to the any other shape, which statement should he change?
Statement1
Statement2
Statement3
Statement4
What does inplace=True parameter represents ?
to update changes in a new copy
to update changes in original copy
will not effect the original copy
none of the above
What parameter is used to change the color of marker in a line chart ?
markercolor
color
markerfacecolor
marker color can't be changed
