10 - AI - Practical File PDF
10 - AI - Practical File PDF
10 - AI - Practical File PDF
PRACTICAL RECORD
BOOK
OF
ARTIFICIAL INTELLIGENCE
CLASS:X
1
KENDRIYA VIDYALAYA AFS SULUR
Certificate
2
CONTENTS
Program Page
Program Name
No No
Python
11 14
Creation of Line chart
12 15
Creation of Bar Chart.
13 16
Creation of Pie Chart.
14 17
Creation of Scatter chart.
COMPUTER VISION
15 18
Write a scratch program to draw square using pen tool.
16 19
Write a scratch program to draw circle using pen tool.
17 20
Create a Mask identification application using Pictoblox.
18 21
Create the automatic attendance taking system using Pictoblox.
19 22
Create the flying cat animation using Scratch.
20 Create the Home based automation using Pictoblox. 23
3
PYTHON:
1.Write a python program to find the average of three numbers.
a = int (input(" Please Enter the First Number: "))
b = int (input(" Please Enter the second number: "))
c = int (input(" Please Enter the third number: "))
average=(a+b+c)/3
print("The average of three numbers is ", average)
Output:
4
2. Write a python program to find area of rectangle.
l = float(input('Enter the length of a Rectangle: '))
b = float(input('Enter the breadth of a Rectangle: '))
Area = l * b print("Area of a Rectangle is:" ,Area)
Output:
Enter the length of a Rectangle: 4
Enter the breadth of a Rectangle: 8
Area of a Rectangle is: 32.0
5
3. Write a python program to find the area of triangle.
b = int(input("Input the base : "))
h = int(input("Input the height : "))
area = b*h/2
print("area = ", area)
Output:
Input the base : 4
Input the height : 8
area = 16.0
6
4. Write a python program to find the perimeter of rectangle.
l = float(input('Enter the length of a Rectangle: '))
b = float(input('Enter the breadth of a Rectangle: '))
Perimeter = 2*(l+b)
print("Perimeter of rectangle is: ");
print(Perimeter);
Output:
18.0
7
5. Write a python program to find the perimeter of triangle.
a = float(input('Please Enter the First side of a Triangle: '))
b = float(input('Please Enter the Second side of a Triangle: '))
c = float(input('Please Enter the Third side of a Triangle: '))
Perimeter = a + b + c
print("The Perimeter of Triangle = " ,Perimeter);
Output:
Please Enter the First side of a Triangle: 4
Please Enter the Second side of a Triangle: 5
Please Enter the Third side of a Triangle: 8
The Perimeter of Triangle = 17.0
8
6.write a python program to find out the cube of three numbers.
num = int(input("Enter an any number: "))
cube = num*num*num
print("Cube of a given number is" ,cube);
Output:
Enter an any number: 4
Cube of a given number is 64
9
7. Write a python program to convert KM to Miles.
km=float(input(“Enter the values in KM”))
miles=Km=0.621371
print("Answers is",miles)
Output:
Enter the values in EM4
Answers is 0.621371
10
8. Write a python program to calculate BMI of a person.
# asking for input from the users
height = float(input("Enter the height in cm: "))
weight = float(input("Enter the weight in kg: "))
# defining a function for BMI
BMI =weight / (height)**2
# printing the BMI
print("Your Body Mass Index is", BMI)
Output:
Enter the height in cm: 4
Enter the weight in kg: 5
Your Body Mass Index is 0.3125
11
9. Write a python program to convert the Celsius to Fahrenheit.
celsius = float(input("Enter temperature in celsius: "))
fahrenheit = (celsius * 9/5) + 32
print('Answer is',fahrenheit)
Output:
Enter temperature in celsius: 4
Answer is 39.2
12
10.Find the given no is odd or even.
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even number".format(num))
else:
print("{0} is Odd number".format(num))
Output:
Enter a number: 4
4 is Even number
13
DATASCIENCE:
11. Observe the given data for monthly sales of one of the salesmen for 6 months. Plot them on the
line chart.
Month January February March April May June
Output:
Sales
4000
3500
3000
2500
2000
1500
1000
500
0
January February March April May June
14
12. a.Consider the following data of a clothes store.
T-
Month Jeans Shirts
Shirts
Chart Title
8000
6000
4000
2000
0
March April May June July August
15
b.Plot them on the pie chart.
Output:
Jeans
5%
22% 11%
21%
19%
22%
16
c.Plot them on the scatter chart.
Output:
8000
7000 6800
6500 6500 6700
6300 6200 6300
6000 5800 6000 6000
5500 5600
5000 5000
4400 4500 4500
4000
3500
3000
2000
1500
1000
0
0 1 2 3 4 5 6 7
17
COMPUTER VISION
13.Write a scratch program to draw square using pen tool.
Output:
18
14. Write a scratch program to draw circle using pen tool.
Output:
19
15.Create a Mask identification application using Pictoblox.
Output:
20
16.Create the automatic attendance taking system using Pictoblox.
Output:
21
17.Create the flying cat animation using Scratch.
Output:
22
18. Create the Home based automation using Pictoblox.
Output:
23