CHINMAYA VIDYALAYA
PALLAVUR
INFORMATICS PRACTICES (065)
PRACTICAL FILE – 2022-23
CLASS - XI
Submitted to: Mrs. K. Usha Submitted by :Amal.C
CERTIFICATE
This is to certify that the Informatics Practices Practical File work is a
bonafide record of work done by Amal.C of class XI of Chinmaya
Vidyalaya Pallavur under the guidance and supervision of Mrs
[Link] Baburaj during the academic year 2022-23.
Signature of Signature of
INTERNAL EXAMINER EXTERNAL EXAMINER
Signature of Principal
INDEX
[Link] Topic Sign
1. Implementing mathematical operations in python
2. Using flow control in python
3. Calculating simple interest
4. Implementing the concept of Nested flow control in python
5. Calculating areas of shapes
6. Calculating profit or loss using IF statement
Using looping statement and for clause to find sum of
7.
squares
8. Program to calculate multiples of ‘n’ numbers in python
9. Program to identify the number of vowels
10. Creating, sorting, displaying list in python
11. Display vowels and number of vowels from list
12. Accessing list elements
Working with Dictionary to store name of state and their
13.
capitals
14. Accessing elements of Dictionary using group function
SQL
15. Database & table creation
16. Inserting records in table
17. Display details from table using select command
18. Displaying details with condition in SQL
19. Calculating average in SQL
20. Implementing where clause in select command
21. Using like membership operator in SQL select command
Using between membership operator in SQL select
22.
command
23. Using order by clause
24. Implementing alter command using SQL
25. Working with update command
Implementing where clause and order by in select
26.
command
27. Implementing (Update, Select, Delete)
28. Using Delete command with where condition
[Link] a program to implement 4 mathematical
Operation with 3 user accepted numbers
Concept learning: basic mathematical operation
Source code:
a=int (input ("enter the first number :"))
b=int (input ("enter the second number :"))
c=int (input ("enter the third number :"))
w=a+b+c
print ("addition of three numbers:"w)
v=a-b-c
print("subtraction of three numbers:",v)
e=a*b*c
print("multiplication of three numbers :",e)
r=(a+b)/c
print("division of three numbers:",r)
Output:
[Link] to find whether the citizen is a minor or not (accept citizen name and
age)
Concept learning : flow control
Source code:
a=input("enter the name :")
b=int(input("enter the age:"))
if b>=18:
print("citizen is not a minor")
else:
print("citizen is a minor")
Output:
3. Write python program to calculate the amount payable if money has
been lent on simple interest principle or money=p,rate=r% per annum and
time=t [Link] simple interest(SI)=(p*r*t)/100.
Concept learning:
Source code:
p=int(input("enter the principal amount:"))
r=float(input ("enter rate of intrest :"))
t=int(input("enter number of years:"))
sum=p*r*t/100
amt=p+sum
print("the payable amount is:",amt)
Output:
[Link] a program to find the greatest of three numbers.
Concept learning: Nested flow control
Source code:
#the following programme shows how to find the greatest among them
a=int(input("enter the first number:"))
b=int(input("enter the second number:"))
c=int(input("enter the third number:"))
if a>b and a>c:
print("greatest is",a)
elif b>c:
print("greatest is",b)
else:
print("greatest is",c)
Output:
[Link] to calculate area of shape such as triangle rectangle and square only
for the positive dimension.
Concept learning :using if statement
Source code:
l1=int(input("enter the length:"))
b1=int(input("enter the breadth:"))
if l1>0 and b1>0:
triangle=1/2*l1*b1
print("area of the triangle is",triangle)
l2=int(input("enter the length:"))
b2=int(input("enter the breadth:"))
if l2>0 and b2>0:
rectangle=l2*b2
print("area of the rectangle is",rectangle)
a=int(input("enter the length:"))
if a>0:
square=a*a
print("area of the square is",square)
Output:
[Link] to calculate profit or loss for the given cost price and selling price.
Concept learning : using output and flow control
Source code:
c=float(input("enter the cost price"))
s=float(input("enter the selling price"))
if s>c :
print("the business had made the profit",s-c)
else:
print("the business had made loss",c-s)
Output:
[Link] to find the sum of squares for the first 100 natural numbers.
Concept learning : implementation of for clause()
Source code: S=0
for n in range(0,101):
N=n*n
S=S+N
print("",N)
print(S)
Output:
[Link] to print the first n multiples of given number.
Concept learning: Implementation of looping statement
Source code:
a1=int(input("enter the first number:"))
a2=int(input("enter the second number:"))
for a in range(1,a2+1):
p=a*a1
print(a1,"*",a2,"=",p)
Output:
[Link] to count number of vowels of given string.
Concept learning: implementation of loop with “for”
Source code:
a=input("enter the string:")
v=0
for s in a:
print(s)
if s=='a' or s =='e' or s =='i'or s =='o'or s =='u':
v=v+1
print("the number of vowel is",a,"is",v)
Output:
[Link] a programme to create a list that stores marks of 10 students and
perform the following:
a)Display in sorted order
b)Display the marks which are above of 70
Concept learning: Implementation of sequenced using list
Source code:
#displays the list in a sorted order:
english=[34,67,78,89,68,59,71,80,45,98]
[Link]()
print(english)
for n in english:
if n >70:
print("the marks are above 70:",n)
[Link] a list that stores 10 characters from a user input and display the
vowels and the numbers of vowels in them.
Concept learning: implementing list
Source code:
A=input("enter the characters:")
B=list(A)
a=len(B)
v=0
if a==10:
for i in B:
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'):
v=v+1
print("The vowels are:",i)
print("The numbers of vowels are:",v)
elif a>10:
print("THE NUMBERS OF CHARACTERS ARE MORE.")
else:
print("THE NUMBERS OF CHARACTERS IS LESS.")
[Link] a program to create a list of 15 user input number and check the user
input number present in the list. Print appropriate message accordingly.
Concept learning :Accessing list element.
Source code:
li=[]
n=int(input("How many numbers do you want to enter to the list:"))
print("Enter the list of numbers:")
for i in range(0,n):
m=int(input())
[Link](m)
num=int(input("enter the number to be searched:"))
position=-1
for i in range (0,len(li)):
position=i+1
if position ==-1:
print("number",num,"is not present in the list")
else:
print("number",num,"is present at position")
[Link] a dictionary to store name of state and their capitals.
Concept learning: Working with dictionary
Source code:
states=dict()
n=int(input("Enter the number of states:"))
for i in range (n):
state=input("Enter name of state:")
capital=input("Enter capital of state:")
states[state]=capital
print("Dictionory created:",states)
[Link] a program to create a dictionary of 10 numbers and the keys
as the first ten alphabet. Print the highest and lowest values of the dictionary.
Concept learning:
Source code: d1=dict()
a=int(input("Enter the first number :"))
b=int(input("Enter the second number :"))
c=int(input("Enter the third number :"))
d=int(input("Enter the fourth number :"))
e=int(input("Enter the fifth number :"))
f=int(input("Enter the sixth number :"))
g=int(input("Enter the seventh number :"))
h=int(input("Enter the eighth number :"))
i=int(input("Enter the nineth number :"))
j=int(input("Enter the tenth number :"))
d1['a']=a
d1['b']=b
d1['c']=c
d1['d']=d
d1['e']=e
d1['f']=f
d1['g']=g
d1['h']=h
d1['i']=i
d1['j']=j
print("Dictionary is created:",d1)
val=sorted([Link]())
print("Highest number is:",val[9])
print("Lowest number is:",val[0])
Output:
SQL
[Link] a table by the name Student details with the following data:
Sid-Int
Sclass –char(10)
Section –char(3)
Gender –char(6)
Name –varchar(30)
DOB-date
ACC-int
ENG- int
IP- int
ECO- int
BST- int
Concept learnig: Database creation.
Source code:
create table students_details(SId int,Sclass char(10),section
char(3),Gender char(6),Name varchar(30),DOB date,ACC int,ENG int,IP
int,ECO int,BST int);
Output:
[Link] insert the details of the students in the above created table.
Concept learning: implementing DML commands.
Source code:
> insert into students_details value(1647, ‘XI ‘ ,‘ B ‘ ,’MALE’,’ KRATOS’,
‘2006-10-06’, 87,99,68,57, 89 );
> insert into students_details value(1648,‘XI’,‘B‘,‘MALE’,‘ZEUS’ ,‘2006-11-
16’,87,98 ,78, 87,99 );
> insert into students_details value(1649,‘XI’, ‘A ‘, ‘FEMALE’ ,
‘ATHINA’,‘2006-06-07’ ,88,92 ,79,84 ,73 );
> insert into students_details value(1650 , ‘XI’,‘A’,‘FEMALE’, ‘ANNA’,‘2006-
06-07’,78,72,75,64,77 );
> insert into students_details value(1651,‘XI’, ‘A’,‘FEMALE’,‘SIRI’, ‘2006-
03-18’,71,70,71,55,75 );
> insert into students_details value(1652,‘XI’,‘A’,‘FEMALE’,‘ALEXA’,‘2006-
07-12’,71,80,91,75, 65 );
> insert into students_details value(1653,‘XI ‘,‘B’,‘MALE’, ‘GAUTHAM’,
‘2006-05-17’, 68, 79, 89, 93,84 );
> insert into students_details value(1654 , ‘XI’ , ‘B’ ‘MALE ‘ ,’ MG
GAUTHAM’ ‘2006-05-11’, 78 , 77 , 79 , 93, 84 );
> insert into students_details value(1655,‘XI’,‘B’ ,’MALE’, ‘LOLAN’, ‘2005-
05-11’, 78 , 77 , 79 , 93, 84 );
> insert into students_details value(1656, ‘XI’,
‘B’,‘FEMALE’ ,’ASHA’ ,’2005-07-21’,71,87,91,92,81);
Output:
[Link] display the entire details of the students.
Concept learning:Implementing DML commands.
Source code:
>select * from students_details;
Output:
[Link] display studentsID,name,and all subject marks of those students who are
scoring marks greater than 50.
Concept learning : Implementing DML commands.
Source code:
select SID,Name,ACC,ENG,IP,ECO,BST from students_details where
ACC>50 and ENG>50 and IP>50 and ECO>50 and BST>50;
Output:
[Link] find average of the students to be displayed.
Concept learning: Implementing DML commands.
select SID,name,(ACC+ENG+IP+ECO+BST)/5 as ‘Average_Mark’ from
students_details;
[Link] the entire details of the students who belongs to sections ‘A’
Concept learning: Implementing DML commands.
Source code: select * from students_details where section in (‘A’);
Output:
[Link] the name and DOB of students whose name starts with letter A.
Concept learning: Impementating DML commands.
Source code: select name,DOB from students_details where name like(‘A%’);
Output:
[Link] SID,name and DOB of those students who are born between 1 JAN
2005 and 30 JUNE 2005.
Concepts learning: Implementing DML commands.
Source code:
select SID,name,ACC,ENG,IP,ECO,BST,(ACC+ENG+IP+ECO+BST)/1
as'total marks'from students_details where DOB between '2006-01-01'and
'2007-06-30';
[Link] SID, gender and marks of the students in the ascending order of the
names.
Concept learning:
Source code:
Output:
[Link] a column email as varchar(100) in the table.
Concept learning: Implementing
Source code: alter table students_detail add(email varchar(100));
Output:
[Link] email of the students to be set as school@[Link].
Concept learning: Implementing
Source code: update students_details set email='school@[Link]';
[Link] SID,gender,name and email of the students in order of their first
subject marks.
Concept learning: Implementing
Source code:
Output:
[Link] the unique section in the table.
Concept learning :
Source code:
Select distinct section from students_details;
Output:
[Link] the details of the students is born after 31 October 2006 and falls
within the class 11th.
Concept learning: Implementing DML commands.
Source code:
delete from student_details where sclass='11th' and section in('A' , 'B');
Output: