Advertisements
Advertisements
प्रश्न
Gurkirat has to fill in the blanks in the given Python program that generates a line plot as shown below. The given line plot represents the temperature (in degree Celcius) over five days as given in the table:
| Days | Temperature |
| Day 1 | 30 |
| Day 2 | 32 |
| Day 3 | 31 |
| Day 4 | 29 |
| Day 5 | 28 |

import _______ as plt # Statement-1
days = ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5']
temp = [30, 32, 31, 29, 28]
plt._____ (days, temp) # Statement-2
plt.xlabel ('_______') # Statement-3
plt.ylabel ('Temperature')
plt.title('________ ') # Statement-4
plt.show()
Write the missing statements according to the given specifications:
- Write the suitable code to import the required module in the blank space in the line marked as Statement-1.
- Fill in the blank in Statement-2 with a suitable Python function name to create a line plot.
- Refer to the graph shown and fill in the blank in Statement-3 to display the appropriate label for x-axis.
- Refer to the graph shown and fill in the blank in Statement-4 to display the suitable chart title.
अति संक्षिप्त उत्तर
Advertisements
उत्तर
- matplotlib.pyplot
- plot
- Days
- Temperature Over 5 Days
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
