Professional Documents
Culture Documents
AI STD X Practical File
AI STD X Practical File
2022-23
SUBMITTED BY :
CLASS :X
ROLL NO :
ACKNOWLEDGEMENT
practical file.
providing me with the facilities and requisite laboratory conditions for making
CERTIFICATE
the PRACTICAL FILE during the academic year 2022-2023 towards partial
supervision.
import numpy as np
arr=np.array([4,8,10,12])
print (arr.sum())
print(arr.prod())
Output:
34
3840
7. Aim: To display the sum, maximum and minimum values row and column wise of a
multidimensional array.
import numpy as a
arr1=a.array([[11,12,13],[22,23,24],[33,34,35]])
print(arr1)
print(arr1.sum())
print(arr1.max(axis=0))
print(arr1.min(axis=0))
print(arr1.max(axis=1))
print(arr1.min(axis=1))
Output:
[[11 12 13]
[22 23 24]
[33 34 35]]
207
[33 34 35]
[11 12 13]
[13 24 35]
[11 22 33]
8. To display an identity matrix holding the value 5 along with its sum.
import numpy as np
arr2=np.full([3,3],5)
print(arr2)
print(arr2.sum())
Output:
[[5 5 5]
[5 5 5]
[5 5 5]]
45
import numpy as np
y=np.array([35,25,25,15])
plt.pie(y)
plt.show()
Output:
10. Display a bar chart for the marks secured by a student.
import numpy as np
x=np.array(["English","Math","Science","Social Science","AI"])
y=np.array([80,95,85,80,92])
plt.bar(x,y)
plt.bar(x,y,width=0.1)
plt.show()
Output:
11. Display a histogram using random values.
import numpy as np
x=np.random.normal(170,10,250)
plt.hist(x)
plt.show()
Output:
COMPUTER VISION
12. Display an image using open cv library.
13. Display a part of an image in gray scale using roi.
14. Resize an image
15. Answer the following questions.
What is the output colour when you put R=G=B=255?
Ans: White
What is the output colour when you put R=G=255,B=0?
Ans: Yellow
What is the output colour when you put R=255,G=0,B=255?
Ans: Pink
What is the output colour when you put R=0,G=255,B=255?
Ans: Cyan
What is the output colour when you put R=G=B=0?
Ans: Black
What is the output colour when you Put R=0,G=0,B=255?
Ans: Blue
What is the output colour when you Put R=255,G=0,B=0?
Ans: Red
What is the output colour when you put R=0,G=255,B=0?
Ans: Green
https://www.w3schools.com/colors/colors_rgb.asp
16.Create your own pixels on piskelapp (https://www.piskelapp.com/) and make a gif image.
Steps:
1. Open piskelapp on your browser.
2. Apply background for the picture.
3. Use pen to draw
4. Copy the layer and paste it
5. Apply the background colour for layer 2
6. Change the pen colour and draw
7. Export the image.