Page 340 - AI Ver 1.0 Class 10
P. 340
Output:
The mean is: 78.57142857142857
The median is: 90
The mode is: 90
16. Create a list of number of voting done in 6 areas and calculate using statistics module:
Standard deviation
Variance
Ans. Program:
import statistics
Voting = [59,52,49,71,44,63]
m1 = statistics.stdev(Voting)
print("The standard deviation is: ", round(m1,2))
Output:
The standard deviation is: 9.91
17. Using the library: import cv2, matplotlib
Upload an image of your favourite city in the world on the screen and give a proper title to it.
Ans. Program:
import cv2
from matplotlib import pyplot as plt
import numpy as np
img = cv2.imread('D:\London.jpg')
plt.imshow(img)
plt.title('My favourite City')
plt.axis('off')
plt.show
Output:
My Favourite City
338 Touchpad Artificial Intelligence-X

