FILE
FILE
[Mehak ZSharma]
CERTIFICATE
This is to certify that MEHAK ZSHARMA, student of
Class XI, DELHI CITY SCHOOL, has completed the
PRACTICAL FILE during the academic year [2024~2025]
towards partial fulfillment of credit for the Informatics
practices practical evaluation of CBSE and submitted
satisfactory report, as compiled in the following pages,
under my supervision.
Examiner Signature
09.
10.
Output of Program 1:
2. Write a python program to find the sale price of an item with a given cost
and discount (%).
Output of program 2:
import math
side=float(input("Enter the side of square:"))
ar_sq=float(side*side)
print("Area of Square:",ar_sq)
peri=float(4*side);
print("Perimeter of square is:",peri)
print()
r=float(input("enter the radius of circle:"))
ar_ci=float(3.14*r*r)
print("Area of circile:",ar_ci)
per_ci=float(2*3.14*r);
print("Perimter of circle is:%.2f"%per_ci)
print()
l=float(input("enter the length of rectangle:"))
b=float(input("enter the breadth of rectangle:"))
ar_rect=float(l*b)
print("Area of rectangle is:",ar_rect)
per_rect=float(2*(l+b))
print("Area of rectangle is:",per_rect)
print()
ba=float(input("enter the base of right angled triangle:"))
h=float(input("enter the height of right angled triangle:"))
ar_tri=float(float((ba*h)/2))
print("Area of triangle is:",ar_tri)
hpt=float(math.sqrt(h*h+ba*ba))
peri_tri=float(h+ba+hpt)
print("Perimter of right angled triangle is:",peri_tri)
Output of Program 3
#input
p = float(input('Enter the principal amount: ')) of
r = float(input('Enter the rate of interest: '))
t = float(input('Enter the time duration: '))
#process
si = (p*r*t)/100
ci= p * ( (1+r/100)**t - 1)
#output
print('Simple interest is:”,si)
print('Compound interest is: “,ci)
Ouptut for Program 4:
5. Write a program to calculate profit-loss for a given Cost and Sell Price.
# driver code
p = float(input("Enter the principal:"))
r = float(input("Enter the rate of interest:"))
t = float(input("Enter the time:"))
#intereset
r = r / (12 * 100)
#total installments
t = t * 12
emi = (p * r * pow(1 + r, t)) / (pow(1 + r, t) - 1)
print("Monthly EMI is= “,emi)
l = []
n = int(input("Enter the Number of List Elements: "))
for i in range(1, n + 1):
ele = int(input("Please enter the Value of Element%d : " %i))
l.append(ele)
mx = mn = l[0]
for j in range(1, n):
if(mn > l[j]):
mn = l[j]
min_pos = j
if(mx < l[j]):
mx = l[j]
max_pos = j
print("The Smallest Element in the List is : ", mn)
print("The position of Smallest Element in the List is : ", min_pos)
print("The Largest Element in the List is : ", mx)
print("The position of Largest Element in the List is : ",max_pos)
Output of 8:
Output of program 9:
10. Write a program to find the sum of squares of the first 100 natural
numbers.
sum1 = 0
for i in range(1, 101):
sum1 = sum1 + (i*i)
print("Sum of squares is : ", sum1)
Output of Program 10:
11. Write a program to print the first ‘n’ multiples of a given number input.
n = int(input("Enter the number to display multiples:"))
m = int(input("Enter the number to display n multiples:"))
#computing multiples
multip = range(n, (n * m) + 1, n)
print(list(multip))
Output of Program 11:
12. Write a program to count the number of vowels in a user entered string.
txt=input("Enter string:")
vowels=0
for i in txt:
if(i=='a' or i=='e' or i=='i' or i=='o' or \
i=='u' or i=='A' or i=='E' or i=='I' or i=='O' or
i=='U'):
vowels=vowels+1
print("Number of vowels are:",vowels)
Output of Program 12
13. Write a program to print the words starting with a particular alphabet in a user
entered string.
students={'Aksh':[34,46,48,33,47],'Bhavik':[44,45,48,43,42]}
print(students)
Output of program 14
st={'Gujarat':'Ghandhinagar','Rajasthan':'Jaipur','Bihar':'Patna'
,'Maharashtra':'Mumbai','Madhya Pradesh':'Bhopal'}
print(st)
Output of program 15
1] Create Database
use class11;
[3] To create a student table with the student id, class, section, gender, name,
dob, and marks as attributes where the student id is the primary key.
desc student; OR
describe student;
[8] To increase marks by 5% for those students who have studentid more than
1105.
update stduent set marks=makrs+(marks*0.05) where
studentid>1105;
[10] To display students , Name and Marks of those students who are scoring
marks more than 50.