Worksheets12revision2
Total questions: 20
Worksheet time: 10mins
Which of the following is not a valid plotting function of pyplot?
line()
plot()
bar()
Pyplots _____________ function is used to create horizontal bar chart
barh()
line()
bar()
Pyplots _________ function is used to create histogram
hist()
boxplot()
bar()
Pyplot is a sub-library of matplotlib library
true
false
what is cumulative histogram?
each bin gives the count in that bin
each bin gives the count in that bin plus all bins for smaller values
How do you create a cumulative histogram using pyplot?
plt.hist(x,bins=30,cumulative=true)
pd.hist(x,bins=30,cumulative=false)
What is data visualisation?
writing data randomwise
displaying data in a graphical chart ,figures and bars
When should you create histograms and when should you create bar charts to present data visually?
histograms are used to compare variables. while bar charts are used to show distributions of variables
histograms are used to show distributions of variables while bar charts are used to compare variables.
write a python program, to display titles for the X-axis as "Range 1", Y-axis as "Log Range" and for the whole chart as "My Chart".
plt.title("My Chart")plt.xlabel("Range 1")plt.ylabel("Log Range")
plt.title("My Chart")plt.xlabel("Range 1")plt.xlabel("Log Range")
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.___________(Games,Rating) #Statement 2 plt.xlabel("Games")
plt.______________("Rating") #Statement 3 plt._______________ #Statement 4
Choose the right code from the following for statement 1
matplotlib as plt
pyplot as plt
matplotlib.pyplot as plt
matplotlib.plt as pyplot
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.___________(Games,Rating) #Statement 2 plt.xlabel("Games")
plt.______________("Rating") #Statement 3 plt._______________ #Statement 4
Choose the right code from the following for statement 2 to plot a bar graph?
line()
hist()
bar()
barh()
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.___________(Games,Rating) #Statement 2 plt.xlabel("Games")
plt.______________("Rating") #Statement 3 plt._______________ #Statement 4
Choose the correct option for the statement 3.
title("Rating")
ytitle("Rating")
ylabel("Rating”)
yaxis("Rating")
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.___________(Games,Rating) #Statement 2 plt.xlabel("Games")
plt.______________("Rating") #Statement 3 plt._______________ #Statement 4
Choose the right function/method from the following for the statement 4.
display()
print()
show()
bar()
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.___________(Games,Rating) #Statement 2 plt.xlabel("Games")
plt.______________("Rating") #Statement 3 plt._______________ #Statement 4
if we wants to change the above plot to the any other shape, which statement, should he change.
Statement 1
Statement 2
Statement 3
Statement 4
Define line chart?
graph that presents categorical data with rectangular bars
Type of chart which displays information as a series of data points connected by straight line segments
circular statistical graphics
--- are the different colours that identify different sets of data that plotted on the plot
x axis
legends
y axis
CSV means
comma seperated values
comma sequence values
comma and values
---- function is used to read data from a CSV file in your dataframe
write_csv()
read_csv()
read_to()
---- function is used to store dataframes data to a CSV file.
write_csv()
to_csv()
read_to()
a CSV file can take --- character as seperator
:
]
,
:;
