IP Jigyashu Patel
IP Jigyashu Patel
Submitted For
Subject “Informatics Practices”
Subject Code: 065
Session 2024-25
Submitted By:
Students Name: Jigyashu.A.Patel
Class: XI Science
Submitted To:
Ms,Shruti ma’am
Program 1
Que. Write a Python program to calculate the amount payable if money has
#Code:-
SI=(P*R*T)/100
Amount_payable=P+SI
#Output
Amount_payable is:Rs.9082.5
Program 2
#Code:-
print(“Menu”)
print(“1.Perimeter of triangle”)
print(“2.Area of triangle”)
choice=int(input(“Enter a choice:”))
if choice==1:
print(“Perimeter of triangle=”,a+b+c)
if choice==2:
print(“Area of triangle=”,1/2*b*h)
else:
Menu
1.Perimeter of triangle
2. Area of triangle
Enter a choice:1
Enter a side 2: 4
Enter a choice: 2
Area of triangle= 5
Enter a choice: 3
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 3
Write a program to find sale price of an item with given price and discount
#Code:-
p= float(input(“Enter a prince:”))
discount=p*dp/100
sp=p-discount
print(“Cost_price=”,p)
print(“Discount=”,discount)
print(“Selling_price”,sp)
#Output
Enter price:7200
Enter discount%:12
Cost price=7200.0
Discount: 864.0
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 4
Import math
smt=prin*(math.pow((1+rate/100),time))
ci= amt-prin
#Output
Rate of Interest: 8
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 5
#Code:-
Remainder= No_1%No_2
If remainder ==0:
else:
#Output
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 6
print(“2.Calculate perimeter”)
if ch==1:
area=3.14*R**2
else:
perm=2*3.14*R
#Output
1. Calulate Area
2. Calculate Perimeter
1. Calulate Area
2. Calculate Perimeter
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 7
#Code:-
for a in range(n):
power =power*x
#Output
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 8
Write a program that takes the name and age of the user as input and
displays a message whether the user is eligible to apply for a diving license
#Code:-
name=input(“Enter name:”)
if age>=18:
else:
#Output
Enter age:18
Enter age: 17
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 9
Write a program to find the largest / smallest value of asset in a given list
of assets of a company.
#Code:-
mx=max(val)
mn=min(val)
print(“Biggest Asset:”,max)
print(“Biggest Asset:”,min)
#Output
Biggest Asset : 56
Smallest Asset: 7
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 10
Write a program to read Roll numbers and marks of four students and
create a dictionary from it having Roll numbers as keys. Also check if roll
#Code:-
rno =[ ]
mks = [ ]
for a in range(4):
rno.append(r)
mks.append(m)
print(“Created dictionary”)
print(d)
if d[2]>75:
else:
Creates dictionary
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 11
their capitals.
#Code:-
stCap= { }
for i in range(n):
st =input(“Enter state:”)
stCap[st] = cap
print(stCap)
#Output
#Code:-
#Output
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 13
#Code:-
Consider already created dictionary M that stores roll numbers and marks.
Write a program to input a roll number and delete it from the dictionary.
Display error and delete it from the dictionary, display error message if the roll
number does not exist in the dictionary.
L1 =[17,24,15,30,34,27]
L2=L1.copy( )
L2[0]+=10
L2[-1]+=10
print(“Original list:”,L1)
#Output
Created copy of the list : [17, 24, 15, 30, 34, 27]
Copy of the list after changes: [27, 24,15 ,30, 34, 37]
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 14
Program to find the minimum element from a list of element along with its
index in the list.
length =len(lst)
min_ele =lst[0]
min_index=0
min_ele = lst[i]
min_index = i
#Output
-9 at index 8
Program 15
Write a program that inputs a list, replicates it twice and the prints the sorted
list in ascending and descending orders.
val =val*2
val.sort( )
val.sort(reverse=True)
#Output
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Program 16
Write a program to input a roll number and delete it from the dictionary.
Display error message if the roll number does not exist the dictionary.
#Code:-
rno =[ ]
mks = [ ]
for a in range(4):
rno.append(r)
mks.append(m)
print(“Created dictionary”)
print(d)
if rno in d:
del d[rno]
else:
print(“Final dictionary”)
print(d)
#Output
Created dictionary
Final Dictionary
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||