0% found this document useful (0 votes)
15 views12 pages

11th UPDATED IP Practical File 2023

The document is a practical file for Class XI Informatics Practices at Dr. Bansi Dhar School, Kota, for the academic year 2023-24. It includes a certificate of completion, an acknowledgment section thanking various individuals for their support, and an index of practical exercises involving Python programming and SQL queries. The practicals cover topics such as calculating averages, creating dictionaries, and performing database operations.

Uploaded by

pgurjar334
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)
15 views12 pages

11th UPDATED IP Practical File 2023

The document is a practical file for Class XI Informatics Practices at Dr. Bansi Dhar School, Kota, for the academic year 2023-24. It includes a certificate of completion, an acknowledgment section thanking various individuals for their support, and an index of practical exercises involving Python programming and SQL queries. The practicals cover topics such as calculating averages, creating dictionaries, and performing database operations.

Uploaded by

pgurjar334
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
You are on page 1/ 12

DR.

BANSI DHAR SCHOOL, KOTA

Practical File
on
Subject:Informatics Practices (065)

Class :XI
(2023-24)

Submitted by:
Name: ________________
Roll No.: ________________
CERTIFICATE

It is certified that this is a bona fide work of ________________ for


class XI of Dr. Bansi Dhar School. He / She has performed these
practical during academic year 2023-24, satisfactorily in subject
Informatics Practices.

 The student’s initiative, cooperation and participation during


classes were Excellent/Good/ Average.
 Her aesthetic presentation, visual appeal, expression and neatness
were Excellent/Good/Average.
 Her content accuracy, creativity, originality and analysis of
different perception and Excellent/Good/Average.

Subject Teacher: _______________ Dr. Chitra Singh Bankavat


Date : _______________ Principal
ACKNOWLEDGEMENT

I which to express my deep gratitude and sincere thanks to Principal Dr. Chitra
Singh Bankavat, Dr. Bansi Dhar School, Kota for her encouragement and for all
the facilities provided by her for these practicals.

I sincerely appreciate this magnanimity by taking me into fold for which I shall
remain indebted to her.

I extend my hearty thanks to the subject teacher who guided me to the successful
completion of these practicals. His guidance, constant encouragement,
constructive comments, sympathetic attitude and immense motivation, has
sustained my efforts to all stages of these practicals.

I can’t forget to offer my sincere thanks to my parents and worthy classmates


who helped me to carry out these practicals successfully and for their valuable
advice and support which I received from time to time. The practicals consumed
huge amount of work, research and dedication. Still, implementation would not
have been possible if I did not have a support of many individuals and
organization. Therefore I would like to extent my sincere gratitude to all of them.

Student’s Name & Sign: ____________________


Class : ____________________
INDEX
Practical Record

S.No. Contents Sign


1 Write a python program to find average and grade for given marks.
2 Write a python program to find sale price of an item with given cost and discount (%).
3 Write a python program to calculate Simple and Compound interest.
4 Write a python program to calculate profit-loss for given Cost and Sell Price.
5 Write a python program to find the largest and smallest numbers in a list.
6 Write python program to print the table of a given number.
7 Write a python program to count the number of vowels in user entered string.
Write a python program to create a dictionary to store names of states and their
8
capitals
Write a python program to create a dictionary of students to store names and marks
9
obtained in 5 subjects.
10 Write a python program to print the highest and lowest values in the dictionary.
11 Write python program to find a number in the list.
12 Write a Python program to add and delete an element in a List .
13 Write a program to print Fibonacci series upto n terms in python.
14 Write python program to draw following pattern.
1 Create a database naming ‘EMPLOYEES’
2 Create table emp_ records as per the structure given below.
3 Enter the following records in table ‘emp_records’.
Write a query to arrange all records in descending order for the given table on basis
4
of salary.
5 Write a query to update the record having employee id as 106 and assign city as Kota.
Write MYSQL query to delete records from the table where employee name is
6
Mayank.
7 Write MYSQL query to add primary key to empid in the above table.
Write MYSQL query to rename column ‘Dept.’ to ‘Department’ in the table
8
Emp_Records.
9 Write MYSQL query to Update HRA to 4% of Salary .
10 Write MYSQL query to update pf to12% of salary.
11 Write a query to calculate the net salary.
12 Write MYSQL command to dd a column ‘Age’ to table ‘emp_records’.
Write a query to display all records for employee having city name beginning with ’D’
13
in emp_records table.
Write a query to display all records from emp_records having exactly four letters city
14 name.
Q1. Write a python program to find average and grade for given marks.
Ans:
#To find average and grade for given marks.#
eng=int(input("Enter marks of English: "))
hin=int(input("Enter marks of Hindi: "))
mat=int(input("Enter marks of Maths: "))
sci=int(input("Enter marks of Science: "))
sst=int(input("Enter marks of Social Studies: "))

sum=eng+hin+mat+sci+sst
avg = sum/5
pr = sum/500*100

print ("English : ", eng)


print ("Hindi : ", hin)
print ("Maths : ", mat)
print ("Science : ", sci)
print ("Social Studies : ", sst)

print("Average: ",avg)
print("Percentage : ",pr)

if(pr>=90):
print("Grade = A")
elif(pr>=80):
print("Grade = B")
else:
print("Grade = C")

OUTPUT:
Enter marks of English: 89
Enter marks of Hindi: 87
Enter marks of Maths: 90
Enter marks of Science: 85
Enter marks of Social Studies: 91
English : 89
Hindi : 87
Maths : 90
Science : 85
Social Studies : 91
Average: 88.4
Percentage : 88.4
Grade = B

1
Q.2 Write a python program to find sale price of an item with given cost and discount (%).
Ans.
# To find sale price of an item with given cost and discount (%).#

cp=int(input("Enter the price of a product: "))


d=int(input("Enter the discount rate: "))

dis=(cp*d/100)
sp=cp-dis

print("Discount amount: ",dis)


print("Selling Price : ",sp)

OUTPUT:
Enter the price of a product: 200

Enter the discount rate: 10


Discount amount: 20.0
Selling Price : 180.0

Q.3 Write a python program to calculate Simple and Compound interest.


Ans.
#To calculate Simple and Compound interest.#
p=int(input("Enter Principle Amount: "))
t=int(input("Enter Time(in years): "))
r=int(input("Enter Interest Rate (%): "))
si=(p*t*r)/100

print("SIMPLE INTEREST: ")


print("Principle Amount: ", p)
print("Time: ",t)
print("Interest Rate: ",r)
print("Simple Interest :", si)

print("COMPOUND INTEREST")

amt=p*(pow((1 + r/100),t))
ci=amt-p
print("Compound Interest : ",ci)

OUTPUT:
Enter Principle Amount: 10000
Enter Time(in years): 5
Enter Interest Rate (%): 8
SIMPLE INTEREST:
Principle Amount: 10000
Time: 5
Interest Rate: 8
2
Simple Interest : 4000.0
COMPOUND INTEREST
Compound Interest : 4693.28

Q4. Write a python program to calculate profit-loss for given Cost and Sell Price.
Ans.
cp=int(input("Enter Cost Price: "))
sp=int(input("Enter Selling Price: "))
profit=sp-cp
print("Profit :",profit)

OUTPUT:
Enter Cost Price: 550
Enter Selling Price: 870
Profit : 320

Q5. Write a python program to find the largest and smallest numbers in a list.
Ans.
#To find the largest and smallest numbers in a list.#

l1=[30,60,8,34,74]
length=len(l1)
l1.sort()
print("length:",l1)
print("largest number : ", l1[4])
print("smallest number: ",l1[0])

OUTPUT:
length: [8, 30, 34, 60, 74]
largest number : 74
smallest number: 8

Q6. Write python program to print the table of a given number.


Ans.
n=int(input("Enter a number for table: "))
for i in range(1,11):
print(i*n)

OUTPUT:
Enter a number for table: 2
2
4
6
8
10
12
14
16
18
20

3
Q7. Write a python program to count the number of vowels in user entered string.
Ans. # To count the number of vowels in user entered string.#
str=input("Enter a string: ")
count=0
for n in str:
if(n=='a'or n=='e'or n=='i'or n=='o'or n=='u'):
count=count+1
print(count)

OUTPUT:
Enter a string: education
5

Q8. Write a python program to Create a dictionary to store names of states and their capitals.
Ans.
#Create a dictionary to store names of states and their capitals.#
dict={'Rajasthan':'Jaipur','Gujarat':'Gandhi Nagar','Uttar Pradesh':'Lucknow'}
print(dict)
OUTPUT: {'Rajasthan': 'Jaipur', 'Gujarat': 'Gandhi Nagar', 'Uttar Pradesh': 'Lucknow'}

Q9. Write a python program to create a dictionary of students to store names and marks obtained
in 5 subjects.
Ans.
# Create a dictionary of students to store names and marks obtained in 5 subjects.#

stud_no=int(input("Enter number of students: "))

result={}

for i in range(stud_no):
print("Enter the details: ",i+1)

rollno=int(input("Enter roll number :"))


name=input("Enter Student Name:")
subject=input("Enter Subject name: ")
marks=int(input("Enter Marks:"))

result[rollno]=[name,subject,marks]
print(result)

OUTPUT:
Enter number of students: 3
Enter the details: 1

Enter roll number :101

Enter Student Name:Avinash

Enter Subject name: English

Enter Marks:60

4
{101: ['Avinash', 'English', 60]}
Enter the details: 2

Enter roll number :102

Enter Student Name:Mayank

Enter Subject name: Social Studies

Enter Marks:56
{101: ['Avinash', 'English', 60], 102: ['Mayank', 'Social Studies', 56]}
Enter the details: 3

Enter roll number :103

Enter Student Name:Sushil Kumar

Enter Subject name: Computer

Enter Marks:87
{101: ['Avinash', 'English', 60], 102: ['Mayank', 'Social Studies', 56], 103: ['Sushil Kumar',
'Computer', 87]}

Q10. Write a python program to print the highest and lowest values in the dictionary.
Ans. # To print the highest and lowest values in the dictionary.#

a={"s1":30,"s2":56,"s3":80,"s4":10}

b= a.values()
greater=max(b)
lowest=min(b)

print(b)

print("greater number is :",greater)


print("lowest number is:",lowest)

OUTPUT:
dict_values([30, 56, 80, 10])
greater number is : 80
lowest number is: 10

Q.11 Write python program to find a number in the list.


Ans. # Write python program to find a number in the list.#
l1=[10,2,30,40,44,12,7,]
l=len(l1)
i=int(input("Enter a number to be searched:"))

if i in l1:
print("found")
else:
print("not found")

5
OUTPUT:
Enter a number to be searched:44
Found

Enter a number to be searched:78


not found

Q12. Write a Python program to add and delete an element in a List .


Ans. # Write a Python program to add and delete an element in a List .#

l1=[10,5,12,14,7,2,33]
print("List before adding an element: ")
n= int(input("Enter a number to be added:"))

l1.append(n)
print("List after adding an element: ",l1)

d=int(input("Enter an number to be deleted: "))


if d in l1:
l1.remove(d)
print("List after deleting an element:",l1)

OUTPUT:
List before adding an element:

Enter a number to be added:66


List after adding an element: [10, 5, 12, 14, 7, 2, 33, 66]

Enter an number to be deleted: 12


List after deleting an element: [10, 5, 14, 7, 2, 33, 66]

Q13. Write a python program to print Fibonacci series up to ‘n’ terms in python.
Ans. # Write a program to print Fibonacci series up to „n‟ terms in python.#

n=int(input("Enter a number term for Fibonacci Series: "))


x=0
y=1

count=0
while count<=n:
print(x, end=" ")
s=x+y
x=y
y=s
count=count+1

OUTPUT:
0 1 1 2 3 5 8 13 21 34

6
Q14. Write python program to draw following pattern.
*
**
***
****
*****
Ans. #Write python program to draw following pattern.#
n=int(input("How many time you want to print a pattern:"))

for i in range(0,n):
for j in range(i+1):
print("*",end="")
print("\r") # ending line after each row

STRUCTURED QUERY LANGUAGE


Q1. Create a database naming ‘EMPLOYEES’
Ans. Create database EMPLOYEES

Q2. Create table emp_ records as per the structure given below.

Field Name Data Types


Empid int(3)
Emp_nm varchar(20)
City varchar(12)
Dept. varchar(12)
Salary int(6)
HRA int(6)
PF int(5)
Net_sal int(8)

Ans. Create table emp_records(empid int(3), emp_nm varchar(20), city varchar(12), dept. varchar(12),
salary int(6), hra int(6), pf int(5), net_sal int(8);

Q3. Write MYSQL query to enter the following records in table ‘emp_records’.

Empid Emp_nm City Dept. Salary Hra Pf Net_sal


(4%) (12%)
101 Vishal Pune Accounts 25000
102 Harish Mumbai Marketing 43000
103 Naman Delhi Accounts 44050
104 Mayank Pune Marketing 23600
105 Shruti Delhi Hr 35000
106 Divya Mumbai Hr 53500

Ans.
Insert into emp_records values (101,‟Vishal‟,Pune‟,‟Accounts‟,25000,NULL,NULL,NULL);

Insert into emp_records values (102,‟Harish‟,‟Mumbai‟,‟Marketing‟,43000,NULL,NULL,NULL);

Insert into emp_records values (102,‟Harish‟,‟Mumbai‟,‟Marketing‟,43000,NULL,NULL,NULL);

7
Q.4 Write a query to arrange all records in descending order for the given table on basis of salary.

Ans. Select * from emp_records order by salary desc;

Q.5 Write a query to update the record having employee id as 106 and assign city as Kota.

Ans. Update emp_records set city=‟kota‟ where empid=106;

Q.6 Write MYSQL query to delete records from the table where employee name is Mayank.

Ans. delete from emp_records where emp_nm=‟mayank‟;

Q.7 Write MYSQL query to add primary key to empid in the above table.

Ans. alter table emp_records add primary key (empid);

Q.8 Write MYSQL query to rename column ‘Dept.’ to ‘Department’ in the table Emp_Records.

Ans. alter table emp_records change column dept department varchar(13);

Q.9 Write MYSQL query to Update HRA to 4% of Salary .

Ans. update emp_records set hra=salary*0.04;

Q.10 Write MYSQL query to update pf to12% of salary.

Ans update emp_records set pf = salary*0.12;

Q.11 Write a query to calculate the net salary.

Ans. update emp_records set net_sal=(hra+salary)-pf;

Q12. Write MYSQL command to dd a column ‘Age’ to table ‘emp_records’.

Ans. alter table emp_records add column age int(2);

Q.13 Write a query to display all records for employee having city name beginning with ’D’ in
emp_records table.

Ans.select * from emp_records where place LIKE „d%‟;

Q.14 Write a query to display all records from emp_records having exactly four letters city name.

Ans. select * from emp_records where city LIKE “_____”;

You might also like