You are on page 1of 36

MAHARISHI VIDYA MANDIR SR. SEC.

SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to search a particular character from the string using binary search
method.
2.Consider the given tables and answer the following questions with SQL commands.

Table – Employee

Empno Name Dob Nativeplace Hobby Gender


122 Ashwini 1981-10-18 Chennai chess f
123 Amit 1965-01-23 Delhi music m
125 Shiksha jain 1977-12-13 Mumbai swimming f
126 Pooja 1980-06-14 Hyderabad sports f
127 Manoj 1976-12-12 Mumbai writing m
128 Arjun 1974-03-10 Pune gardening m
129 Ramesh 1981-10-28 Chennai swimming m
130 Keshav 1977-01-09 Bangalore gardening m
131 Krithika 1976-09-24 Agra music f

Table – Job

Sno Area Aptdate Basic Allowance Retdate Dept


122 Chennai 2003-04-23 12000 2000 2023-04-23 HR
123 Agra 2006-01-25 5000 1500 2026-01-27 Marketing
125 Delhi 2004-04-14 8500 2200 2018-04-14 Sales
126 Bangalore 2005-06-15 3500 1000 2025-06-15 HR
127 Mathura 2006-12-22 6000 1700 2026-12-22 Finance
130 Hyderabad 2003-12-19 14000 2500 2023-12-19 Sales

a) Display all the employee details whose Nativeplace is “Chennai” in descending


order of Name.
b) Print the Name, Basic, Allowance and the netsalary for all those employees whose
name starts with “A” and the netsalary is calculated as Basic + Allowance.
c) Give the total Basic spent for each department.
d) Find the total salary of expenses for those employees whose retired date is after
“2023-01-20” where total salary is calculated as Basic + Allowance.
e) Print the Name, Nativeplace and Basic of those employees whose Area is the
Native place.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to find all even perfect numbers from the given list.
2.Consider the following table and write SQL commands for the following questions.

Table – Emp
Name Basic Department Date of App Age Gender
Aditya 8000 Personnel 2010-03-27 35 m
Ashrita 7300 Accounts 2010-02-19 34 f
Bharat 9500 Computer 2011-01-21 34 m
Giri 9300 Maintenance 2011-02-19 37 m
John 7400 Finance 2010-02-24 36 m
Madhusree 9500 Accounts 2009-01-12 36 f
Niharika 9450 Maintenance 2011-02-22 37 f
Nikhil 8350 Personnel 2008-01-01 33 m
Robert 8250 Personnel 2010-02-20 39 m
Vastsal 7500 Computer 2007-01-13 41 m

a) List all the female employees whose age is below 35.


b) Display Name, Basic, Department and Annual salary where Annual Salary is
calculated as Basic * 12.
c) To update the basic of all female employees by 2% of their basic.
d) Assume that there is one more table Incharge in the database as shown below:
Table – Incharge

Dept Head
Accounts Kishanth
Computer Satyam
Finance Ganpat
Maintenance Surya
Personnel Rahul

Give the command to display employee name, department and their


respective In charge name of all the departments.
e) Display the employee details in their seniority order.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to search a substring and print the number of times the substring is
present in the given string and its index position.

2. Consider the following tables and write SQL commands for the following questions.

Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40
Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01

a) To display the details of those clients whose city is “Delhi”.


b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.
d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to print each and every word of the given string in reverse.
Eg. I LOVE FOOD should be printed as I EVOL DOOF.

2.Consider the given tables and answer the following questions with SQL commands.
Table – Employee

Empno Name Dob Nativeplace Hobby Gender


122 Ashwini 1981-10-18 Chennai chess f
123 Amit 1965-01-23 Delhi music m
125 Shiksha jain 1977-12-13 Mumbai swimming f
126 Pooja 1980-06-14 Hyderabad sports f
127 Manoj 1976-12-12 Mumbai writing m
128 Arjun 1974-03-10 Pune gardening m
129 Ramesh 1981-10-28 Chennai swimming m
130 Keshav 1977-01-09 Bangalore gardening m
131 Krithika 1976-09-24 Agra music f

Table – Job

Sno Area Aptdate Basic Allowance Retdate Dept


122 Chennai 2003-04-23 12000 2000 2023-04-23 HR
123 Agra 2006-01-25 5000 1500 2026-01-27 Marketing
125 Delhi 2004-04-14 8500 2200 2018-04-14 Sales
126 Bangalore 2005-06-15 3500 1000 2025-06-15 HR
127 Mathura 2006-12-22 6000 1700 2026-12-22 Finance
130 Hyderabad 2003-12-19 14000 2500 2023-12-19 Sales

a) Display all the employee details whose Nativeplace is “Chennai” in descending


order of Name.
b) Print the Name, Basic, Allowance and the netsalary for all those employees whose
name starts with “A” and the netsalary is calculated as Basic + Allowance.
c) Give the total Basic spent for each department.
d) Find the total salary of expenses for those employees whose retired date is
after “2023-01-20” where total salary is calculated as Basic + Allowance.
e) Print the Name, Nativeplace and Basic of those employees whose Area is the
Native place.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to create a dictionary which consists of the elements of a list as key
and the number of occurrences of that element as its value.

2.Consider the following table and write SQL commands for the following questions

Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40

Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01

a) To display the details of those clients whose city is “Delhi”.


b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.
d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to count n letter words from the string.(Take value for n from the
user.)

2. Consider the following tables and write SQL commands for the following questions.
Table- Workers

W_ID FIRSTNAME LASTNAME ADDRESS CITY


105 Sarah Ackerman 440 U.S 110 New York
144 Manila Sengupta 24 Friends St. New Delhi
210 George Smith 83 First st. Howard
255 Mary Jones 842 Vine Ave. Losantiville
335 Henry Williams 12 Moore St. Boston
403 Ronny Lee 121 Harrison St. New York
451 Pat Thompson 11 Red Road Paris
Table – Desig

W_ID SALARY BENEFITS DESIGNATION


105 85000 25000 Director
144 70000 15000 Manager
210 75000 12500 Manager
255 50000 12000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman

a) To display the names of all employees living in New York from the table Workers.
b) To display the number of employees in each designation.
c) To display the FIRSTNAME, LASTNAME, and TOTAL SALARY of all clerks from the 5
table Workers and Desig where TOTAL SALARY is calculated as SALARY+BENEFITS. !

d) To display the minimum salary among Manager and Clerks from the table Desig
separately.
e) Find the employees whose salary is less than 50000 but benefits above 7500.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to check whether the given string is a pangram or not. ( a pangram is
a string which has all the 26 alphabets present in it.)

2.Consider the following table and write SQL commands for the following questions.

Table- Workers
W_ID FIRSTNAME LASTNAME ADDRESS CITY
105 Sarah Ackerman 440 U.S 110 New York
144 Manila Sengupta 24 Friends St. New Delhi
210 George Smith 83 First st. Howard
255 Mary Jones 842 Vine Ave. Losantiville
335 Henry Williams 12 Moore St. Boston
403 Ronny Lee 121 Harrison St. New York
451 Pat Thompson 11 Red Road Paris
Table - Desig
W_ID SALARY BENEFITS DESIGNATION
105 85000 25000 Director
144 70000 15000 Manager
210 75000 12500 Manager
255 50000 12000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman
f) To display the names of all employees living in New York from the table Workers.
g) To display the number of employees in each designation.
h) To display the FIRSTNAME, LASTNAME, and TOTAL SALARY of all clerks from the 5
table Workers and Desig where TOTAL SALARY is calculated as SALARY+BENEFITS. !

i) To display the minimum salary among Manager and Clerks from the table Desig
separately.
j) Find the employees whose salary is less than 50000 but benefits above 7500.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to find all the Armstrong numbers in the given list.

2. Consider the given tables and answer the following questions with SQL commands.

Table- Flights

Fl_no Starting Ending No_Flights No_Stops


AM501 Delhi Trivandrum 1 5
AM812 Kanpur Bangalore 3 1
IC301 Mumbai Delhi 8 0
IC302 Delhi Mumbai 8 0
IC701 Delhi Ahmedabad 4 0
IC799 Bangalore Delhi 2 1
MC101 Indore Mumbai 3 0
MU499 Mumbai Madras 3 3

Table- Fares
Fl_no Airlines Fare Tax
AM501 Jet Airways 13450 8
IC302 Indian Airlines 4300 10
IC701 Indian airlines 6500 10
IC799 Indian airlines 10500 10
MC101 Deccan Airlines 3500 4
MU499 Sahara 9400 5

a) Display Fl_no and No_Flights from “Kanpur” to “Bangalore” from the table Flights.
b) Arrange the contents of the table Flights in the ascending order of no of stops.
c) Display the Airlines and Fare to be paid for the flights from “Mumbai” to
“Madras” using the tables Flights and Fares, where the Fare to be paid is
calculated as Fare + Fare * Tax / 100.
d) Display the minimum fare “Indian Airlines” is offering from the table Fares.
e) Display the flight numbers and fares Airlines wise.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to sort the list of integer numbers in descending order using bubble
sort method.

2.Consider the given tables and answer the following questions with SQL commands
Table – Doctor
Id Name Dept Gender Experience
104 Smith Orthopedic M 5
105 Johnson Orthopedic M 10
107 George Cardiology M 10
109 K George Medicine F 9
111 Bill Medicine F 12
114 Lara Skin F 3
117 Lucy Ent F 3

Table- Salary
Id Basic Allowance Consultation
104 23000 2300 500
105 18900 1690 300
109 42000 1700 200
114 12000 5200 100
117 32000 4000 500

a) Display Name of all the doctors who are in “Medicine” having more than 10 years
Experience from the table Doctor.
b) Display the average salary of all doctors working in “Ent” department using
the tables Doctor and Salary where salary is taken as Basic + Allowance.
c) Display the minimum Allowance of female doctors.
d) Display the highest consultation fee among all male doctors.
e) Find the No. of Female doctors.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to sort the list of strings in alphabetical order using insertion sort
method.

2. Consider the following table and write SQL commands for the following questions

Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40

Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01

a) To display the details of those clients whose city is “Delhi”.


b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.
d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program using randint function to guess a number between 1 to 9.


( the Player is given 3 chances to guess the number correct.)
2. Consider the following table and write SQL commands for the following questions

Table –Company

Cid Name City Productname


111 Sony Delhi TV
222 Nokia Mumbai Mobile
333 Onida Delhi TV
444 Sony Mumbai Mobile
555 Blackberry Madras Mobile
666 Dell Delhi Laptop

Table – Customer
Custid Custname Price Qty Cid
101 Rohan Sharma 70000 20 222
102 Deepak Kumar 50000 10 666
103 Mohan Kumar 30000 5 111
104 Sahil Bansal 35000 3 333
105 Neha Soni 25000 7 444
106 Sonal Aggarwal 20000 5 333
107 Arjun Singh 50000 15 666

a) To display the names of the company whose products cast less than 30000.
b) To display the number of companies in every city .
c) To display the name of the customer and name of the company from the given
tables.
d) Display the details of the product name mobile from the given tables.
e) To decrease the prize by 1000 for the customers who purchased more than (Qty)5.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find prime and composite numbers in the given list of numbers.

2. Consider the following table and write SQL commands for the following questions

Table : Employee

Ecode Name Desig Sgrade Doj Dob


11 Amit Executive S003 2003-03-23 1980-01-13
12 Ram IT Head S002 2010-02-12 1987-07-22
13 Chitra Receptionist S003 2009-06-24 1983-07-24
14 Naresh GM S002 2006-08-11 1984-03-03
18 Priya CEO S001 2004-12-20 1982-01-19

Table :SalGrade

Sgrade Salary Hra


S001 56000 18000
S002 32000 12000
S003 24000 8000

a) Display the employees who are born after 1980.

b) Display the details of all the Employees in descending order of Doj from the
tables Employee and SalGrade.

c) Display the employees who are working as Receptionist.

d) Display the average salary of the employees who are Executive.

e)Increase the Salary by 20% for those Employees whose Salary is less than 30000
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to create a dictionary which has every word of string as key and the
number of vowels and consonants as value.

2. Consider the following table and write SQL commands for the following questions
Table – Doctor
Id Name Dept Gender Experience
104 Smith Orthopedic M 5
105 Johnson Orthopedic M 10
107 George Cardiology M 10
109 K George Medicine F 9
111 Bill Medicine F 12
114 Lara Skin F 3
117 Lucy Ent F 3
Table- Salary
Id Basic Allowance Consultation
104 23000 2300 500
105 18900 1690 300
109 42000 1700 200
114 12000 5200 100
117 32000 4000 500

a) Display Name of all the doctors who are in “Medicine” having more than 10
years of experience from the table Doctor.
b) Display the average salary of all doctors working in “Ent” department using
the tables Doctor and Salary where salary is taken as Basic + Allowance.
c) Display the minimum Allowance of female doctors.
d) Display the highest consultation fee among all male doctors.
e) Find the No. of Female doctors.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to create a dictionary which has every word of a given string as its key
and the reverse of the word as its value.

2.Consider the following table and write SQL commands for the following questions.

Table – Emp

Name Basic Department Date of App Age Gender


Aditya 8000 Personnel 2010-03-27 35 m
Ashrita 7300 Accounts 2010-02-19 34 f
Bharat 9500 Computer 2011-01-21 34 m
Giri 9300 Maintenance 2011-02-19 37 m
John 7400 Finance 2010-02-24 36 m
Madhusree 9500 Accounts 2009-01-12 36 f
Niharika 9450 Maintenance 2011-02-22 37 f
Nikhil 8350 Personnel 2008-01-01 33 m
Robert 8250 Personnel 2010-02-20 39 m
Vastsal 7500 Computer 2007-01-13 41 m

a) List all the female employees whose age is below 35.


b) Display Name, Basic, Department and Annual salary where Annual Salary is
calculated as Basic * 12.
c) To update the basic of all female employees by 2% of their basic.
d) Assume that there is one more table Incharge in the database as shown below:
Table – Incharge

Dept Head
Accounts Kishanth
Computer Satyam
Finance Ganpat
Maintenance Surya
Personnel Rahul

Give the command to display employee name, department and their


respective In charge name of all the departments.
e) Display the employee details in their seniority order.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find the palindromic words in the given string.

2.Consider the following table and write SQL commands for the following questions.
Table- Subject

Code Title MarksTheory MarksPrac


301 English 100 0
041 Maths 100 0
083 Computer Science 70 30
042 Physics 70 30
043 Chemistry 70 30
Table – Teacher

Tcode Name Subcode


1 P Jain 301
2 R Nagpal 301
3 Supatra 041
4 Shabnam 083
5 Rashika 042
6 Vidushi 041
7 Yash 043

a) To display the subjects which has no practical marks.


b) To display the total number of teachers in each subject separately from the table
Teacher.
c) To display the names of all the teachers in the ascending order of the Subcode
d) To display subject’s details along with the total marks from the table subject
where Totalmarks = MarksTheory + MarksPrac
e) To display each teacher’s name along with the respective subject name from the
tables Teacher and Subject.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find the prime factors of a given number.

2. Consider the following table and write SQL commands for the following questions.
Table –Company

Cid Name City Productname


111 Sony Delhi TV
222 Nokia Mumbai Mobile
333 Onida Delhi TV
444 Sony Mumbai Mobile
555 Blackberry Madras Mobile
666 Dell Delhi Laptop

Table – Customer
Custid Custname Price Qty Cid
101 Rohan Sharma 70000 20 222
102 Deepak Kumar 50000 10 666
103 Mohan Kumar 30000 5 111
104 Sahil Bansal 35000 3 333
105 Neha Soni 25000 7 444
106 Sonal Aggarwal 20000 5 333
107 Arjun Singh 50000 15 666

a) To display the names of the company whose products cast less than 30000.
b) To display the number of companies in every city .
c) To display the name of the customer and name of the company from the given
tables.
d) Display the details of the product name mobile from the given tables.
e) To decrease the prize by 1000 for the customers who purchased more than (Qty)5.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
HALF YEARLY PRACTICAL EXAMINATION 2019
STD. XI MAX. MARKS : 30
SUBJECT : COMPUTER SCIENCE DURATION:1 1/2HRS
SUB. CODE : 083

1. Write a python program to print the following pattern


1
21
321
4321
54 3 2 1

2.Consider the following tables and write SQL commands for the following questions.
Table- Flights

Fl_no Starting Ending No_Flights No_Stops


IC301 Mumbai Delhi 8 0
IC799 Bangalore Delhi 2 1
MC101 Indore Mumbai 3 0
IC302 Delhi Mumbai 8 0
AM812 Kanpur Bangalore 3 1
AM501 Delhi Trivandrum 1 5
MU499 Mumbai Madras 3 3
IC701 Delhi Ahmedabad 4 0

Table- Fares
Fl_no Airlines Fare Tax
IC701 Indian airlines 6500 10
MU499 Sahara 9400 5
AM501 Jet Airways 13450 8
IC302 Indian Airlines 4300 10
IC799 Indian airlines 10500 10
MC101 Deccan Airlines 3500 4

f) Display Fl_no and No_Flights from “Kanpur” to “Bangalore” from the table Flights.
g) Arrange the contents of the table Flights in the ascending order of no of stops.
h) Display the Airlines and Fare to be paid for the flights from “Mumbai” to
“Madras” using the tables Flights and Fares, where the Fare to be paid is
calculated as Fare + Fare * Tax / 100.
i) Display the minimum fare “Indian Airlines” is offering from the table Fares.
j) Display the flight numbers and fares Airlines wise.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to print the given pattern


ABCDE
ZYXW
ABC
ZY
A
2.Consider the given tables and answer the following questions with SQL commands.
Table – Employee
Empno Name Dob Nativeplace Hobby Gender
122 Ashwini 1981-10-18 Chennai chess f
123 Amit 1965-01-23 Delhi music m
125 Shiksha jain 1977-12-13 Mumbai swimming f
126 Pooja 1980-06-14 Hyderabad sports f
127 Manoj 1976-12-12 Mumbai writing m
128 Arjun 1974-03-10 Pune gardening m
129 Ramesh 1981-10-28 Chennai swimming m
130 Keshav 1977-01-09 Bangalore gardening m
131 Krithika 1976-09-24 Agra music f
Table – Job
Sno Area Aptdate Bassic Allowance Retdate Dept
122 Chennai 2003-04-23 12000 2000 2023-04-23 HR
123 Agra 2006-01-25 5000 1500 2026-01-27 Marketing
125 Delhi 2004-04-14 8500 2200 2018-04-14 Sales
126 Bangalore 2005-06-15 3500 1000 2025-06-15 HR
127 Mathura 2006-12-22 6000 1700 2026-12-22 Finance
130 Hyderabad 2003-12-19 14000 2500 2023-12-19 Sales
a) Display all the employee details whose Nativeplace is “Chennai” in descending
order of Name.
b) Print the Name, Basic, Allowance and the netsalary for all those employees whose
name starts with “A” and the netsalary is calculated as Basic + Allowance.
c) Give the total Basic spent for each department.
d) Find the total salary of expenses for those employees whose retired date is after
“2023-01-20” where total salary is calculated as Basic + Allowance.
e) Print the Name, Nativeplace and Basic of those employees whose Area is the
Native place.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to display the number of words, vowels, consonants, digits, uppercase
alphabets, lowercase alphabets and special character from a given sentence.

2.Consider the following table and write SQL commands for the following questions.

Table – Emp

Name Bassic Department Date of App Age Gender


Aditya 8000 Personnel 2010-03-27 35 m
Ashrita 7300 Accounts 2010-02-19 34 f
Bharat 9500 Computer 2011-01-21 34 m
Giri 9300 Maintenance 2011-02-19 37 m
John 7400 Finance 2010-02-24 36 m
Madhusree 9500 Accounts 2009-01-12 36 f
Niharika 9450 Maintenance 2011-02-22 37 f
Nikhil 8350 Personnel 2008-01-01 33 m
Robert 8250 Personnel 2010-02-20 39 m
Vastsal 7500 Computer 2007-01-13 41 m

a) List all the female employees whose age is below 35.


b) Display Name, Basic, Department and Annual salary where Annual Salary is
calculated as Basic * 12.
c) To update the basic of all female employees by 2% of their basic.
d) Assume that there is one more table Incharge in the database as shown below:
Table – Incharge

Dept Head
Accounts Kishanth
Computer Satyam
Finance Ganpat
Maintenance Surya
Personnel Rahul

Give the command to display employee name, department and their


respective In charge name of all the departments.
e) Display the employee details in their seniority order.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find the nth element of Fibonacci series.


2. Consider the following tables and write SQL commands for the following questions.
Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40
Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01

a) To display the details of those clients whose city is “Delhi”.


b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.
d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to find the sum of series x – x3 /3! + x5/5! - …

2.Consider the given tables and answer the following questions with SQL commands.
Table – Employee

Empno Name Dob Nativeplace Hobby Gender


122 Ashwini 1981-10-18 Chennai chess f
123 Amit 1965-01-23 Delhi music m
125 Shiksha jain 1977-12-13 Mumbai swimming f
126 Pooja 1980-06-14 Hyderabad sports f
127 Manoj 1976-12-12 Mumbai writing m
128 Arjun 1974-03-10 Pune gardening m
129 Ramesh 1981-10-28 Chennai swimming m
130 Keshav 1977-01-09 Bangalore gardening m
131 Krithika 1976-09-24 Agra music f

Table – Job

Sno Area Aptdate Bassic Allowance Retdate Dept


122 Chennai 2003-04-23 12000 2000 2023-04-23 HR
123 Agra 2006-01-25 5000 1500 2026-01-27 Marketing
125 Delhi 2004-04-14 8500 2200 2018-04-14 Sales
126 Bangalore 2005-06-15 3500 1000 2025-06-15 HR
127 Mathura 2006-12-22 6000 1700 2026-12-22 Finance
130 Hyderabad 2003-12-19 14000 2500 2023-12-19 Sales

a) Display all the employee details whose Nativeplace is “Chennai” in descending


order of Name.
b) Print the Name, Basic, Allowance and the netsalary for all those employees whose
name starts with “A” and the netsalary is calculated as Basic + Allowance.
c) Give the total Basic spent for each department.
d) Find the total salary of expenses for those employees whose retired date is
after “2023-01-20” where total salary is calculated as Basic + Allowance.
e) Print the Name, Nativeplace and Basic of those employees whose Area is the
Native place.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find the sum of the following series x-x2/2!+x3/3!-x4/4!+……….

2. Consider the following table and write SQL commands for the following questions

Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40

Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01
a) To display the details of those clients whose city is “Delhi”.
b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.

d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to print the given pattern.


#1
$ AB
#123
$ABCD
#12345
2. Consider the following tables and write SQL commands for the following questions.
Table- Workers

W_ID FIRSTNAME LASTNAME ADDRESS CITY


105 Sarah Ackerman 440 U.S 110 New York
144 Manila Sengupta 24 Friends St. New Delhi
210 George Smith 83 First st. Howard
255 Mary Jones 842 Vine Ave. Losantiville
335 Henry Williams 12 Moore St. Boston
403 Ronny Lee 121 Harrison St. New York
451 Pat Thompson 11 Red Road Paris
Table – Desig

W_ID SALARY BENEFITS DESIGNATION


105 85000 25000 Director
144 70000 15000 Manager
210 75000 12500 Manager
255 50000 12000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman

k) To display the names of all employees living in New York from the table Workers.
l) To display the number of employees in each designation.
m) To display the FIRSTNAME, LASTNAME, and TOTAL SALARY of all clerks from the 5
table Workers and Desig where TOTAL SALARY is calculated as SALARY+BENEFITS. !

n) To display the minimum salary among Manager and Clerks from the table Desig
separately.
o) Find the employees whose salary is less than 50000 but benefits above 7500.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to arrange the elements in the list in ascending order of odd elements
and then even elements.
2.Consider the following table and write SQL commands for the following questions.
Table- Workers
W_ID FIRSTNAME LASTNAME ADDRESS CITY
105 Sarah Ackerman 440 U.S 110 New York
144 Manila Sengupta 24 Friends St. New Delhi
210 George Smith 83 First st. Howard
255 Mary Jones 842 Vine Ave. Losantiville
335 Henry Williams 12 Moore St. Boston
403 Ronny Lee 121 Harrison St. New York
451 Pat Thompson 11 Red Road Paris
Table - Desig
W_ID SALARY BENEFITS DESIGNATION
105 85000 25000 Director
144 70000 15000 Manager
210 75000 12500 Manager
255 50000 12000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman
p) To display the names of all employees living in New York from the table Workers.
q) To display the number of employees in each designation.
r) To display the FIRSTNAME, LASTNAME, and TOTAL SALARY of all clerks from the 5
table Workers and Desig where TOTAL SALARY is calculated as SALARY+BENEFITS. !

s) To display the minimum salary among Manager and Clerks from the table Desig
separately.
t) Find the employees whose salary is less than 50000 but benefits above 7500.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to create a dictionary from a string with every word of the string
as the key and number of digits and special characters as value.

2. Consider the given tables and answer the following questions with SQL
commands. Table- Flights

Fl_no Starting Ending No_Flights No_Stops


AM501 Delhi Trivandrum 1 5
AM812 Kanpur Bangalore 3 1
IC301 Mumbai Delhi 8 0
IC302 Delhi Mumbai 8 0
IC701 Delhi Ahmedabad 4 0
IC799 Bangalore Delhi 2 1
MC101 Indore Mumbai 3 0
MU499 Mumbai Madras 3 3

Table- Fares
Fl_no Airlines Fare Tax
AM501 Jet Airways 13450 8
IC302 Indian Airlines 4300 10
IC701 Indian airlines 6500 10
IC799 Indian airlines 10500 10
MC101 Deccan Airlines 3500 4
MU499 Sahara 9400 5

k) Display Fl_no and No_Flights from “Kanpur” to “Bangalore” from the table Flights.
l) Arrange the contents of the table Flights in the ascending order of no of stops.
m) Display the Airlines and Fare to be paid for the flights from “Mumbai” to
“Madras” using the tables Flights and Fares, where the Fare to be paid is
calculated as Fare + Fare * Tax / 100.
n) Display the minimum fare “Indian Airlines” is offering from the table Fares.
o) Display the flight numbers and fares Airlines wise.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to find the sum of the series 1 + (1+23)+(1+23+33)+… n terms

2.Consider the given tables and answer the following questions with SQL commands
Table – Doctor
Id Name Dept Gender Experience
104 Smith Orthopedic M 5
105 Johnson Orthopedic M 10
107 George Cardiology M 10
109 K George Medicine F 9
111 Bill Medicine F 12
114 Lara Skin F 3
117 Lucy Ent F 3

Table- Salary
Id Bassic Allowance Consultation
104 23000 2300 500
105 18900 1690 300
109 42000 1700 200
114 12000 5200 100
117 32000 4000 500

a) Display Name of all the doctors who are in “Medicine” having more than 10 years
Experience from the table Doctor.
b) Display the average salary of all doctors working in “Ent” department using
the tables Doctor and Salary where salary is taken as Bassic + Allowance.
c) Display the minimum Allowance of female doctors.
d) Display the highest consultation fee among all male doctors.
e) Find the No. of Female doctors.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to replace the repeating elements in a list with zero.

2.Consider the following table and write SQL commands for the following questions

Table – Product

P_ID ProductName Manufacturer Price


BS01 Bath Soap ABC 55
FW05 Face Wash ABC 45
Fw12 Face Wash XYZ 95
SH06 Shampoo XYZ 120
TP01 Talcom powder LAK 40

Table – Client

ClientName City P_ID


Cosmetic Shop Delhi FW05
Total Health Mumbai BS01
Live Life Delhi SH06
Pretty Name Delhi FW12
Dreams Bangalore TP01

a) To display the details of those clients whose city is “Delhi”.


b) To display the details of products whose Price is in the range of 50 to 100 (both
values included).
c) To display the ClientName, and product name where the City is “Mumbai”.
d) Display the maximum price, minimum price, number of products for each
manufacturer.
e) To increase the Price of all the Products by Rs.10.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program to generate a 5 digit number(randomly).


2. Consider the following table and write SQL commands for the following questions
Table –Company

Cid Name City Productname


111 Sony Delhi TV
222 Nokia Mumbai Mobile
333 Onida Delhi TV
444 Sony Mumbai Mobile
555 Blackberry Madras Mobile
666 Dell Delhi Laptop

Table – Customer
Custid Custname Price Qty Cid
101 Rohan Sharma 70000 20 222
102 Deepak Kumar 50000 10 666
103 Mohan Kumar 30000 5 111
104 Sahil Bansal 35000 3 333
105 Neha Soni 25000 7 444
106 Sonal Aggarwal 20000 5 333
107 Arjun Singh 50000 15 666

a) To display the names of the company whose products cast less than 30000.
b) To display the number of companies in every city .
c) To display the name of the customer and name of the company from the given
tables.
d) Display the details of the product name mobile from the given tables.
e) To decrease the prize by 1000 for the customers who purchased more than (Qty)5.
MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL
ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1. Write a python program find the words that ends with vowel in a given string.

2.Consider the following table and write SQL commands for the following questions
Table : Employee

Ecode Name Desig Sgrade Doj Dob


11 Amit Executive S003 2003-03-23 1980-01-13
12 Ram IT Head S002 2010-02-12 1987-07-22
13 Chitra Receptionist S003 2009-06-24 1983-07-24
14 Naresh GM S002 2006-08-11 1984-03-03
18 Priya CEO S001 2004-12-20 1982-01-19

Table :SalGrade

Sgrade Salary Hra


S001 56000 18000
S002 32000 12000
S003 24000 8000

a) Display the employees who are born after 1980.

b) Display the details of all the Employees in descending order of Doj from the
tables Employee and SalGrade.

c) Display the employees who are working as Receptionist.

d) Display the average salary of the employees who are Executive.

e)Increase the Salary by 20% for those Employees whose Salary is less than 30000

MAHARISHI VIDYA MANDIR SR. SEC. SCHOOL


ANNUAL PRACTICAL EXAMINATION – 2020
COMPUTER SCIENCE
STD: XI Max. Marks: 30
SUB CODE: 083 DURATION: 1 1/2HRS.

1.Write a python program to generate a word of 5 letters (can have upper and lower case letters)
randomly.

2.Consider the following table and write SQL commands for the following questions
Table – Doctor
Id Name Dept Gender Experience
104 Smith Orthopedic M 5
105 Johnson Orthopedic M 10
107 George Cardiology M 10
109 K George Medicine F 9
111 Bill Medicine F 12
114 Lara Skin F 3
117 Lucy Ent F 3
Table- Salary
Id Bassic Allowance Consultation
104 23000 2300 500
105 18900 1690 300
109 42000 1700 200
114 12000 5200 100
117 32000 4000 500

a) Display Name of all the doctors who are in “Medicine” having more than 10
years of experience from the table Doctor.
b) Display the average salary of all doctors working in “Ent” department using
the tables Doctor and Salary where salary is taken as Bassic + Allowance.
c) Display the minimum Allowance of female doctors.
d) Display the highest consultation fee among all male doctors.
e) Find the No. of Female doctors.

You might also like