CLASS 10 – ARTIFICIAL INTELLIGENCE
PYTHON PRACTICAL RECORD
1. Program to check Prime Number
Code:
num = 7
flag = True
for i in range(2, num):
if num % i == 0:
flag = False
if flag:
print("Prime number")
Output:
Prime number
2. Simple Chatbot
Output:
You: hi
Bot: Hello!
3. Calendar Program
Output:
February 2025 calendar displayed
4. Character Type Check
Output:
Uppercase letter
5. Simple Calculator
Output:
Addition: 15
Subtraction: 5
Multiplication: 50
Division: 2.0
6. Number Pattern
Output:
23
456
7 8 9 10
7. NumPy 2D Array
Output:
[[1 2]
[3 4]]
8. DataFrame
Output:
Maths 75 78
Science 80 82
English 85 88
9. CSV Import
Output:
CSV data displayed successfully
10. Line Plot
Output:
Line graph displayed
11. Bar Chart
Output:
Bar chart displayed
12. Histogram
Output:
Histogram displayed
13. Pie Chart
Output:
Pie chart displayed
14. Scatter Plot
Output:
Scatter plot displayed
15. Read Image using OpenCV
Output:
Image displayed successfully
16. Original Image Display
Output:
Original image displayed
17. Gray Scale Image
Output:
Gray image displayed
18. Crop Image
Output:
Cropped image displayed
19. Resize Image
Output:
Resized image displayed
20. Multiple OpenCV Operations
Output:
Shape: (height, width, 3)
Max pixel: 255
Min pixel: 0
Image saved successfully