0% found this document useful (0 votes)
12 views2 pages

Basic Programs in Python

The document contains a series of Python programming exercises for Class IX students at Delhi Public School-Bopal, Ahmedabad, for the session 2025-2026. Each exercise includes a specific task, such as calculating the area and perimeter of geometric shapes, finding simple interest, converting units, and calculating averages. The programs utilize basic input and output functions to demonstrate fundamental programming concepts.

Uploaded by

rishavishwa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Basic Programs in Python

The document contains a series of Python programming exercises for Class IX students at Delhi Public School-Bopal, Ahmedabad, for the session 2025-2026. Each exercise includes a specific task, such as calculating the area and perimeter of geometric shapes, finding simple interest, converting units, and calculating averages. The programs utilize basic input and output functions to demonstrate fundamental programming concepts.

Uploaded by

rishavishwa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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)

You might also like