NEW
Font size
Worksheets2021 Sample Paper 14 (TERM 1)
Total questions: 55
Worksheet time: 55mins
Statement A Histograms are used to describe distributions.
Statement B To specify the intervals in x-axis, the property used is “interval”.
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.
What happens, if the show() function is not used in a chart plotting code?
The chart is not plotted
An error is generated
Chart is plotted but not displayed
Chart is plotted , shown but with improper data
Firewalls are
softwares that destroy viruses
commercial softwares
utilities that filter the entry of malwares
cleaner softwares
Given the statements regarding Internet use :
Statement A We can freely comment on anything.
Statement B Age and gender should not be asked.
Statement C Bulk E-mail attachments cannot be send to people.
Statement D We can try to get access to other’s E-mails.
Which of the statements justify proper use of Internet?
Statement A and Statement B
Statement B and Statement C
Statement C and Statement D
Statement B and Statement D
Index Values
“Exec” 125000
“Officer’’ 90000
“Clerk” 75000
The output of the code Empgrade.iloc[1:10] will be
"officer" 90000
"officer" 90000
"clerk" 75000
Error in code
Empty Set
The activities to be done, if someone has mistakenly responded to a phishing attack.
Change the passwords
Contact the fraud department of the institution
Ignore it
Change Password and Contact Fraud Department
collegedf=pd.DataFrame({‘Name’:[‘Jack’,‘Priya’,‘Subodh’],‘Maths’:[45,89,98],‘IP’
:[89,78,66]})
The number of columns and rows in the dataframe is
3,4
3,3
1,3
None of the above
Ways to prevent identity theft are
use strong and unique password
avoid posting confidential information online
do not post personal information on social media
All of the above
What is the difference between pop() and drop() functions?
pop() removes permanently, but drop() removes temporarily
No difference
drop() function does not exist.
pop() is used to remove a row , but drop() removes a column
Which of the following come under cyber crime?
Theft of a new laptop
Access of a bank account in unauthorised way
Unauthenticated modification of a company’s data online
Both except Theft of laptop
The command to make an empty dataframe “df1” is
df1=Empty
df1=[]
df1=blank
df.clear()
Given a dataframe “Marksdf” storing the following :
Index Name Maths Physics
0 Anil 67 89
1 Anirban 23 96
2 Souvik 100 45
To print the marks in Physics that are >65, the code would be
for a in Marksdf [‘Physics’]:
if a>65:
print(a)
for a in range(Marksdf.length):
if a>65:
print(a)
a=0
while a<Marksdf.‘Physics’.values:
if a>65:
print(a)
None
Ankita created a dataframe “Student” storing data of students as follows :
Name Maths IP
0 Jack 45 89
1 Priya 89 78
2 Subodh 98 66
The output of the command : Student ['Maths']<56 will display
0 True
1 False
2 False
0 True
1 False
2 False
Error
Which among the following cannot be a source of phishing?
A financial institution
A chain store
A school
Both chain store and school
Predict output of the following code:
s1=pd.Series([20,40,60,80])
s1=s1%3
s2=s1.head(3)
print(s2)
0 2
1 1
2 0
0 1
2 2
2 2
1 1
2 0
With respect to the dataframe “Bank”:
Index BankName Type
0 SBI Govt
1 Axis Private
2 PNB Govt
3 CBI Govt
What will be the output of the code?
m=‘Pr’
for a in Bank[‘Type’]:
if m in a:
print(a)
Govt
Private
1
Empty
Index Patient Eye Power
0 Mr. Rakesh 2.5
1 Ms. Sita 1.2
2 Ms. Julie 1.0
The output of the command print(Eye[2:10]) will be
Error
2 Ms. Julie 1.0
Empty Set
0 Mr. Rakesh 2.5
Statement A In Python Pandas, all functions start with uppercase alphabets.
Statement B All function calls must end by a semicolon (;).
Both statements are correct
Both statements are incorrect
Statement A is correct, but Statement B is incorrect.
Statement A is incorrect, but Statement B is correct
The statement to create the dataframe will be :
Football=pd.Dataframe(‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5])
Football=pd.DataFrame({‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5]})
Football= DataFrame{‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5]}
Football= DataFrame(‘Player’:[‘Ronaldo’,‘Pele’,‘Maradona’],‘Club’:
[‘AC Milan’,‘Real Madrid’,‘Royal Argentina’],‘Charges’:[9.6,10.5,19.5])
The shape of the dictionary is given by
Football.dim
Football.size
Shape(Football)
None of these
To set the index as ‘R’,’P’ and ‘M’ respectively for the three rows, the command she
should write is
Football= Football.re_index([‘R’,‘P’,‘M’])
Football= Football.index([‘R’,‘P’,‘M’])
Football=Football.reindex([‘R’,‘P’,‘M’])
Football.newindex(‘R’,‘P’,‘M’)
To make all the charges to 11.9, the statement would be
Football.‘Charges’=11.9
Football(‘Charges’)=11.9
Football[‘Charges’]=11.9
None of these
The output of the statement : Football[‘Charges’]/2 will be
0 4.0
1 5.0
2 9.0
0 40
1 50
2 90
0 4.80
1 5.25
2 9.75
Error
What will be the output of the command Football.size?
10
9
12
15
Arithmetic operations are possible on a dataframe’s
rows
columns
rows and columns
Arithmetic operations are not possible
In a dataframe, columns can store
same type of data
different types of data
only integers
None of the above
The indexes of a series can be seen by the property
indexes
index
values
indices
While slicing a series, if user specifies an index that is more than the last index
no error will occur
python will give an index error
abnormal output will be produced
only the element at the last index will be returned
Which of the following method(s) is/are not available for a series?
Head()
Tail()
iloc()
Head and Tail
Ahitagni was confused whether a dataframe has integer indexes for rows or columns
or both. Columns in a dataframe have by default indexes
starting from ‘a’
starting from 1
starting from 0
starting from 2
Simran wanted to see the number of bytes occupied by her series “mseries”, the
command she should write is
mseries.bytes
mseries.size
mseries.nbytes
mseries.ndim
The ................... function displays a grid in the chart wall
datagrid()
grid()
chartgrid()
pattern()
To plot two lines in two different views of the same window, the function used is
Plot()
plot()
subplot()
plotviews()
Charts cannot be shown
without data
without legends
without title
without axis labels
Which of the following is not true about a freeware?
Available free of cost
Can be modified
Can be copied
Can be redistributed
W3C stands for
World Wide Web
World Web Concerns
World Wide Web Consortium
World Wide Web Concerts
Which of the following is/are not open source software(s)?
Tally
Adobe Photoshop
MS-Windows
All of the above
The drop() function can remove from a dataframe
rows
columns
both rows and columns
drop() function is not available for dataframes
Practice of obtaining contribution from online community is called
communitysourcing
multisourcing
crowdsourcing
crowdgathering
Free softwares allow
free usage
modification
copying
All of these
If two dataframes containing numeric values are added, the resultant dataframe will
have
corresponding elements joined
corresponding elements added
dataframes cannot be added
None of these
The least restrictive open source license is
GNU
Apache
CC
MIT
Which of the following attribute(s) is/are not available with the read_csv() function,
while reading a CSV file?
names
skiprows
heading
nrows
Theft of personal digital information in order to commit crime is called
data theft
identity theft
mail theft
personal theft
The original code written by programmers for a software is called
program code
object code
source code
original code
In a URL, https:// means
the site is simple
the website is secured
the website is owned by the state government
the website is not safe
Missing values in a series can be inserted as
NaN
NULL
NIL
All of these
While reading a CSV file Debanjan wanted to skip 2 rows each time, what parameter
he has to write with the read_csv() function?
Skip=2
skip=2
rows=2
skiprows=2
A dataframe “studs” is created with columns “Name”,”Age” . The column “Age” can
now be
renamed
deleted
modified
All of the above operations are possible
A Series “practice” was created as follows:
import pandas as als
practice=als.Series(20,index=range(1,10,3))
How many values does the Series contain?
3
4
1
Series cannot be created using range()
Given below is a code , what will be the output of the print statement?
import pandas as pd
import numpy as np
s1=np.arange(1,6,2)
s2=pd.Series(index=s1,data=s1**2)
print(s2)
1 3
3 9
5 25
2 4
4 16
6 36
1 1
2 4
3 9
None of the above
Mack a student at Stanford University has created a Series “os” storing names of some
operating systems as values, as follows :
import pandas as pd
os=pd.Series([“Windows”,“Linux”,“Unix”,“DOS”],index=[10,20,30,40])
Now, he wants to create another Series “newos” with values same as “os” but index as
double of the indexes of “os”. The statement he should write
newos=pd.Series(os.value,index=os.index*2)
newos=pd.series(os.values,indexes=index*2)
newos=pd.Series(os.values,index=os.index*2)
None of the above
An echo chamber is
small group of like minded people in a web app or social media
a chatting room of a state
a common room of a country
a room of employees of an organisation
Statement A A legend box must be given when data of multiple elements are plotted
to compare , in a bar chart.
Statement B The legend is shown using the description() function
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.
In plotting a line chart, the abbreviation “-“ produces a
dotted line
solid line
dash-dot line
dashed line
