Page 123 - IPP-12-2025
P. 123
31. Which library is used for plotting in Python language?
Ans. Matplotlib is the library used for plotting in Python language.
32. What is the purpose of plot() function?
Ans. plot() is a versatile command and takes an arbitrary number of arguments to plot a chart in Matplotlib
library. For example, plot (x, y) to plot x versus y.
33. List the methods used with pyplot.
Ans. Various methods used with pyplot object are:
• plot()
• show()
• title()
• xlabel()
• ylabel()
• explode()
• bar()
• hist()
• scatter()
• box plot()
34. What are Subplots in Matplotlib library?
Ans. Subplots are grids of plots within a single figure. Subplots can be plotted using subplots() function from
matplotlib.pyplot module.
35. Name the pyplot functions for the following work (Assume plt as the alias name for pyplot).
(a) To display gridlines in the graph .
(b) To display the legend for the chart .
(c) To display the chart .
(d) To display the heading for the graph .
(e) To display the heading for the x-axis .
(f) To remove the gridlines from the chart .
Ans. (a) plt.grid(True) (b) plt.legend()
(c) plt.show() (d) plt.title()
(e) plt.xlabel() (f) plt.grid(False)
36. Which function is used to draw a histogram?
Ans. hist()
37. What is a CSV file?
Ans. Comma Separated Values (CSV) file is a type of plain text file that is the simplest way to store/arrange
tabular data. It must be saved with the .csv file extension. It can store numbers as well as text. Each line
represents a record wherein the data corresponding to every field is separated or delimited by comma.
38. Which Pandas method is used to read CSV file?
Ans. read_csv()
39. Which argument is to be given in read_csv() method to suppress first row as header?
Ans. header = None
40. Which Pandas method is used to send content of a dataframe to CSV file?
Ans. to_csv()
41. Define a Network. Why is it needed?
Ans. A network is an interconnected collection of autonomous computers that can share and exchange
information.
Need for networking:
(i) Resource sharing: Resources are shared by all computers over the network for effective utilization.
(ii) File sharing: A file in a network can be accessed from anywhere.
42. What are the various types of Networks?
Ans. A Network is an interconnection of several nodes through some communication media with the goal of
sharing data, files and resources. There are four types of networks:
(i) Personal Area Network (PAN) (ii) Local Area Network (LAN)
(iii) Metropolitan Area Network (MAN) (iv) Wide Area Network (WAN)
Viva Voce V.3