DELHI PUBLIC SCHOOL-BOPAL, AHMEDABAD
CLASS: IX (AI) PRACTICE PYTHON PROGRAMS SESSION: 2025-2026
#1. WAP to display area and perimeter of a rectangle
L=int(input("Enter length-"))
B=int(input("Enter breadth-"))
area=L*B
perimeter=2*(L+B)
print("Area of rectangle is",area)
print("Perimeter of rectangle is",perimeter)
#2. WAP to display area and perimeter of a square
Side=int(input("Enter Side of square-"))
area=Side*Side
perimeter=4*Side
print("Area of square is",area)
print("Perimeter of square is",perimeter)
#3. WAP to display area and perimeter of a circle
R=float(input("Enter radius-"))
area=22/7*R*R
perimeter=2*22/7*R
print("Area of square is",area)
print("Perimeter of square is",perimeter)
#4. WAP to find the simple interest and amount
P=float(input("Enter principle-"))
R=float(input("Enter rate of interest-"))
T=float(input("Enter terms-"))
SI=P*R*T/100
AMT=P+SI
print("Simple interest is",SI)
print("Amount is",AMT)
#5. WAP to convert meter to kilometer and meter to centimeter
M=float(input("Enter length in meter-"))
KM=M/1000
CM=M*100
print("Length in meter is",M)
print("Length in kilometer is",KM)
print("Length in centimeter is",CM)
#6. WAP to convert temperature in Celsius to temperature in Farenheit
#(Hint: F=C*9/5+32)
C=float(input("Enter temperature in Celsius-"))
F=C*9/5+32
print("Temperature in Farenheit=", F)
#7. WAP to find the average of 3 numbers
n1=float(input("Enter first no-"))
n2=float(input("Enter second no-"))
n3=float(input("Enter third no-"))
tot=n1+n2+n3
avg=tot/3
print("The given numbers are :-",n1,n2,n3)
print("Sum of 3 given numbers:-",tot)
print("Average:=",avg)