APEEJAY SCHOOL KHARGHAR
ARTIFICIAL INTELLIGENCE (417)
PRACTICAL FILE
2025-26
Submitted by : Ashrita Shriram Fowkar
Class : 9th B
Roll No : 9208
CERTIFICATE
This is to certify that
_______________________
of class _____has completed the
required practical work in Artificial
Intelligence for the academic year
2025-26.
Teacher In-charge : Snehal Lohe
Signature : ________________
Date : ________________
INDEX
Sr. Program
1 Check age for voting.
2 Check age for voting driving Licence.
3 Check if number is even or odd
4 Find greatest among three numbers
5 Print multiplication table of a number.(25)
6 Print sum of 3 numbers.
7 Multiplication of 2 numbers.
8 Calculate area of square.
9 Calculate area of rectangle.
10 Calculate area of circle.
11 Calculate circumference of circle
12 Calculate simple interest.
13 Calculate volume of cone.
14 Calculate area of triangle.
Python Programs
1. Check age for voting :-
Code :-
a = int (input(“Enter your current age”))
if
a > = 18
print (“you are elligible for voting”)
else
print (“you are not elligible for voting”)
Output :-
Enter your age : 20
Eligible for voting
2. Check age for voting driving Licence:-
Code :-
a = int (input(“Enter your current age”))
if
a > = 18
print (“you are elligible for voting or driving licence”)
else
print (“you are not elligible for voting or driving
licence”)
Output :-
Enter your age : 16
Not eligible for voting or driving licence
3) Check if number is even or odd :-
Code:-
num = int (input(“Enter a number”))
if num % 2 = 0 :
print (num , “is even”)
else
print (num , “is odd”)
Output :-
Enter a number : 7
7 is odd
4) Find greatest among three numbers:-
Code :-
a = float (input(“Enter a number”))
b = float (input(“Enter a number”))
c = float (input(“Enter a number”))
if a > = b and a > = c
print (“Largest number is ;” a)
if b > = a and b > = c
print (“Largest number is ;” b)
else
print (“Largest number is ;” c)
Output :-
Enter a number : 12 , 45 , 28
45.0 is greatest
5) Print multiplication table of a number (25) :-
Code :-
For i in range (1,11) :
print (“25*”, i , “=”, 25*i)
Output :-
Multiplication of 25 :
25 * 1 = 25
25 * 2 = 50
25 * 3 = 75
25 * 4 = 100
25 * 5 = 125
25 * 6 = 150
25 * 7 = 175
25 * 8 = 200
25 * 9 = 225
25 * 10 = 250
6) Print sum of 3 numbers :-
Code :-
Num1 = int (input(“Enter the first number”))
Num2 = int (input(“Enter the second number”))
Num3 = int (input(“Enter the third number ”))
Sum of numbers = Num1 + Num2 + Num3
Then print (“sum of three numbers”)
Output :-
Enter three numbers : 5 , 10 , 15
Sum = 30.0
7) Multiplication of 2 numbers :-
Code :-
Num1 = int (input(“Enter the first number”))
Num2 = int (input(“Enter the second number”))
Product of numbers = Num1 * Num2
Then print (“product of two numbers”)
Output :-
Enter two numbers : 6 , 7
Product = 42.0
8) Calculate area of square :-
Code :-
a = float (input(“Enter the side of the square”))
b=a*a
print (“area of the square”)
Output :-
Enter side : 4
Area = 16.0
9) Calculate area of rectangle :-
Code :-
c = float (input(“Enter the length of the rectangle”))
d = float (input(“Enter the breadth of the rectangle”))
e=c*d
print (“area of the rectangle:”, e)
Output :-
Enter length : 10
Enter breadth : 6
Area = 16.0
10) Calculate area of circle :-
Code :-
f = float (input(“Enter the radius of the circle”))
g = π*r² = πr²
print (“area of the circle:”, g)
Output :-
Enter radius : 5
Area = 78.54
11) Calculate circumference of circle :-
Code :-
h = float (input(“Enter the radius of the circle”))
i = 2*π*r = 2πr
print (“area of the circle:”, i)
Output :-
Enter radius : 5
Circumference = 31.42
12) Calculate simple interest :-
Code :-
p = float (input(“Enter the principal amount”))
r= float (input(“Enter the rate of interest ”))
t = float (input(“Enter time in years”))
j = p*r*t / 100
print (“simple interest:”, j)
Output : -
Enter principal : 1000
Enter rate : 10
Enter time : 2
Simple Interest = 200.0
13) Calculate volume of cone :-
Code :-
k = float (input(“Enter the radius of the base of the cone”))
l = float (input(“Enter the height of the cone”))
m = 1/3hπr²
print (“volume of the cone:”, m)
Output :-
Enter radius : 3
Enter height : 7
Volume = 65.97
14) Calculate area of triangle :-
Code :-
n = float (input(“Enter the height of the triangle ”))
o = float (input(“Enter the base of the triangle”))
p = 0.5*n*o
print (“area of a triangle:”, p)
Output :-
Enter base : 10
Enter height : 8
Volume = 40.0