0% found this document useful (0 votes)
2 views

class X AI python programs (2)

This document is a practical record file for Artificial Intelligence submitted by a student named Anisha for the academic session 2024-25 at P M Shri Kendriya Vidyalaya Bhandup. It includes acknowledgments, a certificate of completion, and a list of 14 practical activities involving Python programming, data visualization, and image processing. Each activity is accompanied by code snippets and sample outputs demonstrating various programming concepts.

Uploaded by

ankurkumar99421
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

class X AI python programs (2)

This document is a practical record file for Artificial Intelligence submitted by a student named Anisha for the academic session 2024-25 at P M Shri Kendriya Vidyalaya Bhandup. It includes acknowledgments, a certificate of completion, and a list of 14 practical activities involving Python programming, data visualization, and image processing. Each activity is accompanied by code snippets and sample outputs demonstrating various programming concepts.

Uploaded by

ankurkumar99421
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

CENTERAL BOARD OF SECONDARY

EDUCATION

P M SHRI KENDRIYA VIDYALAYA BHANDUP

NCH COLONY , NAVAL DOCKYARD , KANJURMARG WEST ,


MUMBAI – 400078

PRACTICAL RECORD FILE

OF

ARTIFICIAL INTELLEGENCE

SESSION – 2024-25

SUBMITTED BY : ANISHA

SUBJECT TEACHER (AI) : MR. AJIT KUSHWAHA

CLASS : X – C

ROLL NO :
ACKNOWLEDGEMENT
I wish to express my deep sense of gratitude and
indebtedness to our learned teacher MR . AJIT
KUSHWAHA, TGT COMPUTER INSTRUCTOR, K.V.
BHANDUPSHIFT-1 for his invaluable help, advice
and guidance in the preparation of this project.

1 am also greatly indebted to our principal MR.


A.C. RAJPUT and school authorities for providing
me with the facilities and requisite laboratory
conditions for making this practical file.

I also extend my thanks to a number of teachers,


my classmates and friends who helped me to
complete this practical file successfully.

-Anisha

CERTIFICATE
This is to certify that Anisha, student of
Class X - C, P M SHRI KENDRIYA VIDYALAYA
BHANDUP SHIFT-1, MUMBAI has completed
the PRACTICAL FILE during the academic
year 2024-25 towards partial fulfillment of
credit for the ARTIFICIAL NTELLIGENCE
practical evaluation of 2024-25 and
submitted satisfactory report, as compiled
in the following pages, under my
supervision.
Total number of practical certified are: 14.

Internal Examiner
External Examiner
Signature
Signature

Date: School Seal


Principal Signature
ARTIFICIAL INTELLIGENCE (417) PRACTICAL LIST 2024-25

Activity 1: Write a Python code to calculate Simple Interest if the principal amount =
2000 ,rate of interest = 8, time = 10
P= int(input(“Enter Principal amount : ”))
T=int(input(“Enter Time: ”))
R=int(input(“Enter Rate of interest : ”))
SI=(P*T*R)/100
print(“Simple Interest is”,SI)
Run:
Enter Principal amount : 2000
Enter Time:10
Enter Rate of interest : 8
Simple Interest is 1600.0

Activity 2: Write a Python code to calculate Area of a triangle with Base and Height
B=int(input(“Enter Base of a rectangle: ”))
H=int(input(“Enter Height of a rectangle: ”))
print(“Area of a rectangle is”,0.5*B*H)
Run:
Enter Base of a rectangle : 5
Enter Height of a rectangle : 4
Area of a rectangle is 10.0

Activity 3: Write a Python code to check whether a person is eligible to vote or not.
Age=int(input(“Enter person’s age : ”))
if Age>=18:
print(“Person is Eligible to vote”)
else:
print(“Person is not Eligible to vote”)
Run:
Enter person’s age 21
Person is Eligible to vote

Activity 4: Write a Python code to print sum of first 10 natural numbers


S=0
for i in range(1,11):
S=S + i
print(“Sum of first 10 natural numbers is”,S)
Run:
Sum of first 10 natural numbers is 55

Activity 5: Write a program to create a list and display list elements.


l=[]
n=int(input(“Enter length of the list : ”))
for i in range(n):
a=eval(input(“Enter list element : ”))
l.append(a)
print(“Created list is”,l)
Run:
Enter length of the list : 5
Enter list element : 10
Enter list element : 20.5
Enter list element : 45
Enter list element : 78
Enter list element : 23
Created list is [10, 20.5, 45, 78, 23]

Activity 6: Write a program to add the elements of the two lists.


l1=[20,30,40]
l2=[30,50,10]
l3=l1+l2
print("Addition of",l1,"and",l2,"is",l3)
Run:
Addition of [20, 30, 40] and [30, 50, 10] is [20, 30, 40, 30, 50, 10]

Activity 7: Write a program to calculate mean, median and mode using Numpy
import numpy as np
import statistics as st
l=[30,20,50,60,20]
l1=np.array(l)
print("Mean of",l1,"is",st.mean(l1))
print("Median of",l1,"is",st.median(l1))
print("Mode of",l1,"is",st.mode(l1))
Run:
Mean of [30 20 50 60 20] is 36
Median of [30 20 50 60 20] is 30
Mode of [30 20 50 60 20] is 20
Addition of [20, 30, 40] and [30, 50, 10] is [20, 30, 40, 30, 50, 10]
Activity 8: Write a program to display line chart from (2,5) to (9,10).
import matplotlib.pyplot as plt
x=(2,9)
y=(5,10)
plt.plot(x,y)
Run:

Activity 9: Write a program to display a scatter chart for the following points (2,5), (9,10),
(8,3),(5,7),(6,18).
import matplotlib.pyplot as plt
x=[2,9,8,5,6]
y=[5,10,3,7,18]
plt.scatter(x,y)
plt.title("Line chart")
plt.show()
Run:
Activity 10: Write a program to display bar chart for the following data with appropriate
titles:
Subjects=[“Eng”,”Sci”,”Soc”,”Maths”,”AI”]
Marks=[89,87,78,90,99]
import matplotlib.pyplot as plt
Sub=["Eng","Sci","Soc","Maths","AI"]
Marks=[89,87,78,90,99]
plt.bar(Sub,Marks)
plt.title("Term-1 Performance")
plt.xlabel("Subjects")
plt.ylabel("Marks")
plt.show()
Run:

Activity 11: Read CSV file saved in your system and display 5 rows
import pandas as pd
df=pd.read_csv(r"C:\Users\ADMIN\Desktop\abc.csv",nrows=10)
print(df)
Run:
RNO NAME MARKS
0 1 HARI 67
1 2 RAMESH 89
2 3 SOMESH 56
3 4 RAJESH 78
4 5 BHIMESH 45

Activity 12: Read CSV file saved in your system and display its information
import pandas as pd
df=pd.read_csv(r"C:\Users\ADMIN\Desktop\abc.csv",nrows=10)
print(df)
Run:
RNO NAME MARKS
0 1 HARI 67
1 2 RAMESH 89
2 3 SOMESH 56
3 4 RAJESH 78
4 5 BHIMESH 45
5 6 SRIKANTH 67
6 7 SRINIVAS 89
7 8 SANDHYA 90
8 9 SADANA 56
9 10 RAJU 45
Activity 13: Write a program to read an image and display using Python
import cv2
img=cv2.imread("abc.jpg")
cv2.imshow('Image',img)
cv2.waitKey(0)
Run:

Activity 14: Write a program to read an image and display image shape and size using
Python
import cv2
img=cv2.imread(r"C:\Users\ADMIN\Desktop\abc.jpg")
cv2.imshow('myimg',img)
print("The shape of the image is",img.shape)
print("The Size of the image is ; ",img.size)
cv2.waitKey(0)
Run:

The shape of the image is (148, 259, 3)

The Size of the image is 114996

You might also like