RAS AL KHAIMAH – UAE
GRADE XI
PRACTICAL RECORD
(065) INFORMATICS PRACTICES
2023-2024
1
SCHOLARS INDIAN SCHOOL
RAS AL KHAIMAH – UAE
CERTIFICATE
This is to certify that, this is a bonafide record of practical work done by
NAME : …………………………………….
REGISTER NUMBER : ………………………
CLASS : ……………………..
SUBJECT CODE & SUBJECT : ……………………………………………………
In SCHOLARS INDIAN SCHOOL Laboratory during the Academic Year 2023 – 2024 and
submitted for the practical examination held on ………………..
TEACHER-IN-CHARGE H.O.D PRINCIPAL
Mrs.Ameena Sherief Mrs. Samiha Latheef Mr.Hameed Ali Yahya
2
CONTENT
PROGRAM TERM I-PYTHON PROGRAM PAGE
NO. NO.
1. Write a program to see average and grade for given marks. 5
2. Write a program to discover the sale price of an item with a given cost and 7
discount (%).
3. Write a program to compute perimeter/circumference and area of shapes such 8
as triangle, rectangle, square, and circle
4. Write a program to compute Simple and Compound interest. 11
5. Write a program to calculate profit-loss for given Cost and Sell Price. 12
6. Write a program to estimate EMI for Amount, Period, and Interest. 13
7. Write a program to estimate tax – GST / Income Tax. 14
8. Write a program to discover the largest and smallest numbers in a list. 15
9. Write a program to see the third largest/smallest number in a list. 16
10. Write a program to discover the sum of squares of the first 100 natural 17
numbers
11. Write a program to print the initial ‘n’ multiples of an assigned numeral. 18
12. Write a program to count the number of vowels in the user-entered string. 19
13. Write a program to print the words starting with an alphabet in a user-entered 20
string.
14. Write a program to print the number of occurrences of a given alphabet in 21
each string
15. Construct a dictionary to store the names of states and their capitals. 22
16. Build a dictionary of students to store names and marks obtained in 5 subjects. 23
3
PROGRAM TERM II-DATABASE MANAGEMENT-SQL QUERIES PAGE
NO. NO.
1. Write SQL query to construct a database. 26
2. Write SQL query to make a student table with the student id, class, section, 26
gender, name, dob, and marks as attributes where the student id is the primary
key.
3. Write SQL query to put in the details of at least 10 students in the above table 28
4. Write SQL query to show the entire content of the table. 29
5. Write SQL query to exhibit the studentid, Name, and Marks of those students 29
who are scoring marks more than 50.
6. Write SQL query to see the average of marks from the student table. 30
7. Write SQL query to discover the number of students, who are from section 30
‘A’.
8. Write SQL query to indicate the information to all the students, whose name 30
starts with ‘Sh’.
9. Write SQL query to show studentid, Name, DOB of those students who are 31
born between ‘2005- 01-01’ and ‘2005-12-31’.
10. Write SQL query to demonstrate studentid, Name, DOB, Marks, and Email 31
of those male students in ascending order of their names.
11. Write SQL query to show Rno, Gender, Name, DOB, Marks, and Email in 31
descending order of their marks.
12. Write SQL query to exhibit the distinct section available in the table. 32
4
PROGRAM-1: Write a program to see average and grade for given marks.
Aim: To calculate the average and grade for the marks.
Code:
print("Enter Marks Obtained in 5 Subjects (out of 100): ")
markOne = int(input())
markTwo = int(input())
markThree = int(input())
markFour = int(input())
markFive = int(input())
tot = markOne+markTwo+markThree+markFour+markFive
avg = tot/5
if avg>=91 and avg<=100:
print("Your Grade is A1")
elif avg>=81 and avg<91:
print("Your Grade is A2")
elif avg>=71 and avg<81:
print("Your Grade is B1")
elif avg>=61 and avg<71:
print("Your Grade is B2")
elif avg>=51 and avg<61:
print("Your Grade is C1")
elif avg>=41 and avg<51:
print("Your Grade is C2")
5
elif avg>=33 and avg<41:
print("Your Grade is D")
elif avg>=21 and avg<33:
print("Your Grade is E1")
elif avg>=0 and avg<21:
print("Your Grade is E2")
else:
print("Invalid Input!")
Output:
Enter Marks Obtained in 5 Subjects (out of 100) :
100
90
80
100
100
Your Grade is B1
6
PROGRAM-2: Write a program to discover the sale price of an item with a given cost and
discount (%).
Aim: To discover the sale price of an item with a given cost and discount (%).
Code:
price=float(input("Enter Price : "))
dp=float(input("Enter discount % : "))
discount=price*dp/100
sp=price-discount
print("Cost Price : ",price)
print("Discount: ",discount)
print("Selling Price : ",sp)
Output:
Enter Price : 45
Enter discount % : 10
Cost Price : 45.0
Discount: 4.5
Selling Price : 40.5
7
PROGRAM-3: Write a program to compute perimeter/circumference and area of shapes
such as triangle, rectangle, square, and circle.
Aim: To compute perimeter/circumference and area of shapes.
Code:
import math
c=int(input("choose the required shape for which you want to find area and
circumference,Press:"+"\n"+"1 for triangle"+"\n"+"2 for rectangle"+"\n"+"3 for
square"+"\n"+"4 for circle"+"\n"+”Enter your choice:”))
if(c==1):
a=int(input("Enter the values for the side 1 of triangle"))
b=int(input("Enter the values for the side 2 of triangle"))
c=int(input("Enter the values for the side 3 of triangle"))
s=(a+b+c)/2
area_t=math.sqrt(s*(s-a)*(s-b)*(s-c))
peri_t=a+b+c
print("Area of the triangle:",round(area_t,2),"\n","perimeter of
triangle:",round(peri_t,2))
elif(c==2):
a=int(input("Enter the value for the length of rectangle"))
b=int(input("Enter the value for the breadth of rectangle"))
area=a*b
peri=2*(a+b)
8
print("Area of the rectangle:",round(area,2),"\n","Perimeter of
rectangle:",round(peri,2))
elif(c==3):
a=int(input("Enter the measurement for one side of square"))
area=a*a
peri=4*a
print("Area of the square:",round(area,2),"\n","Perimeter of square:",round(peri,2))
elif(c==4):
a=int(input("Enter the radius of circle:"))
area=3.14*a*a
peri=2*3.14*a
print("Area of the circle:",round(area,2),"\n","Perimeter of circle:",round(peri,2))
else:
print("Invalid choice")
Output:
choose the required shape for which you want to find area and circumference,Press:
1 for triangle
2 for rectangle
3 for square
4 for circle
Enter your choice:4
Enter the radius of circle:3
9
Area of the circle: 28.26
Perimeter of circle: 18.84
10
PROGRAM-4: Write a program to compute Simple and Compound interest
Aim: To compute Simple and Compound interest
Code:
P = input("\n Enter the principal amount: ")
T = input("\n Enter the time: ")
R = input("\n Enter the rate: ")
Si = (int(P) * float(T) * float(R) ) /100
Ci = int(P) * (((1 + float(R)/100) ** int(T)) - 1)
print("\n Simple Interest = ",round(Si,2))
print("\n Compound Interest = ",round(Ci,2))
Output:
Enter the principal amount: 15000
Enter the time: 2
Enter the rate: 10
Simple Interest = 3000.0
Compound Interest = 3150.0
11
PROGRAM-5: Write a program to print multiples of 5.
Aim: To print multiples of 5.
Code:
N=int(input(“enter the limit:”))
Print(“The first”,N,”multiples of 5 are:”)
For i in range(1,N+1):
Print(‘5 *’,i,”=”,5*i)
Output:
>>>
Enter the limit:5
The first 5 multiples of 5 are:
5*1=5
5*2=10
5*3=15
5*4=15
5*5=25
12
PROGRAM-6: Write a program to estimate EMI for Amount, Period, and Interest
Aim: To estimate EMI for Amount, Period, and Interest.
Code:
p = float(input("Enter principal amount: "))
R = float(input("Enter annual interest rate: "))
n = int(input("Enter number of months: " ))
r = R/(12*100)
emi = p * r * ((1+r)**n)/((1+r)**n - 1)
print("Monthly EMI = ", round(emi,2))
Output:
Enter principal amount: 10000
Enter annual interest rate: 6
Enter number of months: 10
Monthly EMI = 1027.71 >>>
13
PROGRAM-7: Write a program to estimate tax – GST / Income Tax.
Aim: To estimate tax – GST / Income Tax.
Code:
GSTrate = float( input( "Enter the rate of Taxation on the commodity:"))
Amount = float( input( "Enter the Total amount under consideration:"))
Gstamt=(GSTrate*Amount)/100
print("The tax amount applicable on the given price is: Rs.", Gstamt)
Totalamt = Gstamt + Amount
print("The tax amount payable (inclusive of all taxes) is found to be: Rs.", Totalamt)
Output:
>>>
Enter the rate of Taxation on the commodity:2.5
Enter the Total amount under consideration:200
The tax amount applicable on the given price is: Rs. 5.0
The tax amount payable (inclusive of all taxes) is found to be: Rs. 205.0
14
PROGRAM-8: Write a program to discover the largest and smallest numbers in a list
Aim: To discover the largest and smallest numbers in a list.
Code:
lst = []
num = int(input('How many numbers: '))
for n in range(num):
numbers = int(input('Enter number '))
lst.append(numbers)
print("Maximum element in the list is :", max(lst), "\n”,” Minimum element in the list is
:", min(lst))
Output:
How many numbers: 5
Enter number 20
Enter number 24
Enter number 12
Enter number 23
Enter number 50
Maximum element in the list is : 50
Minimum element in the list is : 12
15
PROGRAM-9: Write a program to see the third largest/smallest number in a list.
Aim: To see the third largest/smallest number in a list
Code:
lst = []
num = int(input('How many numbers: '))
for n in range(num):
numbers = int(input('Enter number '))
lst.append(numbers)
lst.sort()
if(len(lst)<3):
print("Cannot process the list, the length of list is less than 3")
else:
print("The third largest element is:",lst[-3],"\n","The third smallest number is:",lst[2])
Output:
How many numbers: 6
Enter number 2
Enter number 3
Enter number 4
Enter number 5
Enter number 1
Enter number 6
The third largest element is: 4
The third smallest number is: 3
16
PROGRAM-10: Write a program to discover the sum of squares of the first 100 natural
numbers.
Aim: To extend the list, to append ,insert ,pop, remove, clear, reverse and sort an items to the
list.
Code:
print("The sum of squares of first 100 natural numbers is:")
sum=0
for i in range(1,101,1):
sum=sum+(i*i)
print(sum)
Output:
The sum of squares of first 100 natural numbers is:
338350
17
PROGRAM-11: Write a Python program to print the initial ‘n’ multiples of an assigned
numeral
Aim: To write a program to print the initial ‘n’ multiples of an assigned numeral
Code:
num=int(input("Enter the number:"))
mul=int(input("Enter no: of multiples required:"))
for i in range(1,mul+1,1):
print(i,"*",num,"=",i*num)
Output:
Enter the number:5
Enter no: of multiples required:10
1*5=5
2 * 5 = 10
3 * 5 = 15
4 * 5 = 20
5 * 5 = 25
6 * 5 = 30
7 * 5 = 35
8 * 5 = 40
9 * 5 = 45
10 * 5 = 50>>>
18
PROGRAM-12: Write a program to count the number of vowels in the user-entered string.
Aim: To count the number of vowels in the user-entered string.
Code:
str=(input("Enter the string:"))
count=0
for i in str:
if(i.lower() in ['a','e','i','o','u']):
count=count+1
print("The total count of vowels in the string:",count)
Output:
Enter the string: UMBRELLA
The total count of vowels in the string: 3
19
PROGRAM-13: write a program to print the words starting with an alphabet in a user-
entered string.
Aim: To print the words starting with an alphabet in a user-entered string.
Code:
str=(input("Enter the input string:"))
c=input("Enter the starting alphabet:")
words=str.split(" ")
count=len(words)
print("The words starting with the alphabet",c,"are:")
for i in range(count):
str=words[i]
if(str[0]==c.lower() or str[0]==c.upper()):
print(str)
Output:
Enter the input string:Hai, how are you
Enter the starting alphabet:h
The words starting with the alphabet h are:
Hai,
how
20
PROGRAM-14: Write a program to print the number of occurrences of a given alphabet in
each string
Aim: To print the number of occurrences of a given alphabet in each string.
Code:
str=(input("Enter the input string:"))
c=input("Enter the alphabet to be checked:")
words=str.split(" ")
count=len(words)
n=0
for i in range(count):
str=words[i]
l=len(str)
for j in range(l):
if(str[j]==c.lower() or str[j]==c.upper()):
n=n+1
print("The no: of occurence of character,",c,"in the word ‘",str,"’is:",n)
n=0
Output:
Enter the input string:hello how are you
Enter the alphabet to be checked:o
The no: of occurence of character, o in the word ' hello ' is: 1
The no: of occurence of character, o in the word ' how ' is: 1
The no: of occurence of character, o in the word ' are ' is: 0
The no: of occurence of character, o in the word ' you ' is: 1
21
PROGRAM-15: Construct a dictionary to store the names of states and their capitals.
Aim: To create a dictionary to store the names of states and their capitals.
Code:
dict={}
N=int(input("Enter the limit:"))
for i in range(N):
state=input("Enter the state:")
cap=input("Enter the capital:")
dict[state]=cap
print("The stored dictionary:",”\n”,dict)
Output:
Enter the limit:3
Enter the state:kerala
Enter the capital:Thiruvananthapuram
Enter the state:Bihar
Enter the capital:Patna
Enter the state:Karnataka
Enter the capital:Bangalore
The stored dictionary:
{'kerala': 'Thiruvananthapuram', 'Bihar': 'Patna', 'Karnataka': 'Bangalore'}
22
PROGRAM-16: Build a dictionary of students to store names and marks obtained in 5
subjects.
Aim: To build a dictionary of students to store names and marks obtained in 5 subjects.
Code:
dict={}
lis=[]
N=int(input("Enter the totat number of students:"))
for i in range(N):
print("Enter the details of the student")
name=input("Enter the name of the student:")
for j in range(5):
print("Enter the marks for subject",j+1,":")
mark=float(input())
lis.append(mark)
print("******************************")
dict[name]=lis
lis=[]
print("The stored dictionary:","\n",dict)
Output:
Enter the totat number of students:3
Enter the details of the student
23
Enter the name of the student:Arun
Enter the marks for subject 1 :
45
Enter the marks for subject 2 :
46
Enter the marks for subject 3 :
40
Enter the marks for subject 4 :
50
Enter the marks for subject 5 :
47
******************************
Enter the details of the student
Enter the name of the student:Vivek
Enter the marks for subject 1 :
40
Enter the marks for subject 2 :
50
Enter the marks for subject 3 :
45
Enter the marks for subject 4 :
44
Enter the marks for subject 5 :
50
******************************
24
Enter the details of the student
Enter the name of the student:Rinu
Enter the marks for subject 1 :
40
Enter the marks for subject 2 :
45
Enter the marks for subject 3 :
46
Enter the marks for subject 4 :
47
Enter the marks for subject 5 :
50
******************************
The stored dictionary:
{'Arun': [45.0, 46.0, 40.0, 50.0, 47.0], 'Vivek': [40.0, 50.0, 45.0, 44.0, 50.0], 'Rinu': [40.0,
45.0, 46.0, 47.0, 50.0]}
25
DATABASE MANAGEMENT-SQL QUERIES
QUERY-1: Write SQL query to construct a database.
create database class11;
use class11;
QUERY-2: Write SQL query to make a student table with the student id, class, section,
gender, name, dob, and marks as attributes where the student id is the primary key.
create table student
(studentid int(4) primary key,
class char(2),
section char(1),
gender char(1),
name varchar(20),
dob date,
marks decimal(5,2));
26
desc student; OR
describe student
27
QUERY-3: Write SQL query to put in the details of at least 10 students in the above table
insert into student values
(1101,'XI','A','M','Aksh','2005/12/23',88.21),
(1102,'XI','B','F','Moksha','2005/03/24',77.90),
(1103,'XI','A','F','Archi','2006/04/21',76.20),
(1104,'XI','B','M','Bhavin','2005/09/15',68.23),
(1105,'XI','C','M','Kevin','2005/08/23',66.33),
(1106,'XI','C','F','Naadiya','2005/10/27',62.33),
(1107,'XI','D','M','Krish','2005/01/23',84.33),
(1108,'XI','D','M','Ayush','2005/04/23',55.33),
(1109,'XI','C','F','Shruti','2005/06/01',74.33),
(1110,'XI','D','F','Shivi','2005/10/19',72.30);
28
QUERY-4: Write SQL query to show the entire content of the table.
select * from student;
QUERY-5: Write SQL query to exhibit the Rno, Name, and Marks of those students who
are scoring marks more than 50.
select studentid,name,marks from student where marks>50;
29
QUERY-6: Write SQL query to see the average of marks from the student table
select avg(marks) from student;
QUERY-7: Write SQL query to discover the number of students, who are from section ‘A’.
select count(*) from student where section = 'A';
QUERY-8: Write SQL query to indicate the information to all the students, whose name
starts with ‘Sh’.
select * from student where name like 'Sh%';
30
QUERY-9: Write SQL query to show studentid, Name, DOB of those students who are born
between ‘2005- 01-01’ and ‘2005-12-31’.
select studentid, name, dob from student where dob between '2005-01-01' and '2005-12-31';
QUERY-10: Write SQL query to demonstrate studentid, Name, DOB, Marks, and Email of
those male students in ascending order of their names.
Select studentid, name, dob from student order by name;
QUERY-11: Write SQL query to show studentid, Gender, Name, DOB, Marks, and Email
in descending order of their marks
select studentid, gender, name, dob, marks, email from student order by marks desc;
31
QUERY-12: Write SQL query to exhibit the distinct section available in the table.
select distinct section from student;
32