Ai Project File-Python Programs
Ai Project File-Python Programs
PROGRAM-1
ADDITION OF 2 NUMBERS
INPUT-
OUTPUT-
PROGRAM-2
SUBTRACTION OF 2 NUMBERS
INPUT-
OUTPUT-
PROGRAM-3
PRODUCT OF 2 NUMBERS
INPUT-
OUTPUT-
PROGRAM – 4
QUOTIENT
INPUT-
OUTPUT-
PROGRAM – 5
FINDING REMAINDER
INPUT-
OUTPUT-
PROGRAM – 6
FINDING THE GREATER OF THE 2 NUMBERS
INPUT-
Output
PROGRAM – 7
ELIGIBILITY TO VOTE
INPUT-
OUTPUT-
OR
PROGRAM – 8
ODD OR EVEN NUMBER
INPUT-
OUTPUT-
OR
Program – 9
Area of Rectangle
l = int(input("Enter the length of the rectangle:- "))
b = int(input("Enter the breadth of the rectangle:- "))
area = l*b
print("The area of the given rectangle is", area)
Output
Program – 10
Area of Square
s = int(input("Enter the length of the side of the square:- "))
area = s*s
print("The area of the square is", area)
Output
Program – 11
Area of Triangle
h = int(input("Enter the height of the triangle:- "))
b = int(input("Enter the base of the triangle:- "))
area = 0.5*h*b
print("The area of the given triangle is", area)
Output
Program – 12
Area of Circle
r = float(input("Enter the radius of the circle:- "))
area = 3.14*r*r
print("The area of the circle is", area)
Output
Program – 13
Finding Simple Interest
p = int(input("Enter the Principal amount:- "))
t = int(input("Enter the Time period (in years):- "))
r = float(input("Enter the Rate of interest (in %):- "))
SI = (p*t*r)/100
print("The Simple Interest is:", SI)
Output
Program – 14
Creating a List
cricketers=["Virat", "Dhoni", "Rohit", "Bumrah", "Siraj", "Jaiswal"]
print("The names of the cricketers are:- \n")
print(cricketers)
Output
Program – 15
Creating a Tuple
footballers=("Ronaldo", "Messi", "Neymar", "Mbappe", "Pele")
print("\n The names of the footballers are :- \n")
print(footballers)
Output
Program – 16
Creating a Dictionary
c aptains={"RCB":"Virat", "CSK":"Dhoni", "MI":"Rohit", "DC":"Kl Rahul",
"LSG":"Pant"}
print("\n The IPL teams and their captains are :- \n")
print(captains)
Output