Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CS Practical’s List 2022-2023

Class 12

Submissi
S.N. Topics Date on
Date
1 Print total, percentage and grade of five subject marks through function. 13-Apr-22 20-Apr-22

2 Print number is even or odd through function. 13-Apr-22 20-Apr-22

3 Print simple interest or compound interest through function. 14-Apr-22 20-Apr-22

4 Print Fibonacci series through function. 14-Apr-22 20-Apr-22

5 Print reverse number through function. 20-Apr-22 27-Apr-22

6 Print LCM and GCD through function. 20-Apr-22 27-Apr-22

7 Print number of vowels present in string 21-Apr-22 27-Apr-22


WAP to enter a string and a substring. It should then display the number 21-Apr-22 27-Apr-22
8
of occurrences of the given substring in the line
WAP that returns the largest even number in the list of integers. If there is 27-Apr-22
9 04-May-22
no even number in input, print ”No even number”
27-Apr-22
10 WAP to find the median from a given list. 04-May-22
WAP that users a dictionary that contains ten usernames and password. 28-Apr-22
The program should ask the user to enter their username and passwords.
If user name is not in the dictionary, the program should indicate that the
11 person is not a valid user of the system. IF the user name is in the 04-May-22
dictionary, but the user does not enter the right password, the program
should say that the password is invalid. If the password is correct, then
the program should tell the user that they are now logged into the system
Create a nested dictionary that stores the marks details along with student 28-Apr-22
12 04-May-22
names and then prints the output.
WAP that read a text file line by line and display each word separated by
13 13-July-22 20-July-22
a #.
WAP that read a text file and display the number of vowels/ consonants/
14 14-July-22 20-July-22
uppercase/ lowercase characters in the file.
WAP that to r emove all the lines that contain the character `a' in a file and
15 28-July-22 03-Aug-22
write it to another file.
WAP that create a binary file with name and roll number. Search for a
16 given roll number and display the name, if not found display appropriate 28-July-22 03-Aug-22
message
WAP that create a binary file with roll number, name and marks. Input a
17 03-Aug-22 10-Aug-22
roll number and update the marks.
WAP that create a binary file with roll number, name and marks. Input a roll
18 03-Aug-22 24-Aug-22
number and update the marks.
19 Write a Python program to implement a stack using a list data-structure 24-Aug-22 01-Sep-22
20 Consider the table given below and write the query for the following 01-Sep-22 07-Sep-22
Table: CLUB
GCode GameName Numbe Fees StartingDate
r
101 Carom Board 2 5000 2004-01-23
102 Badminton 2 120000 2003-12-12
103 Table Tennis 4 8000 2004-02-14
104 Chess 2 9000 2004-01-01
105 Lawn Tennis 4 25000 2004-03-19

1. To display the name of all games with their Gcodes.


2. To display details of those games which are having Fees more than
7000.
3. To display the content of the CLUB table in descending order of
startDate.
4. To delete the record of all GameNames. 5. List the minimum and
maximum fees from CLUB.
21 Consider the tables FLIGHTS & FARES. Write SQL commands for the 07-Sep-22 14-Sep-22
statements

i) Display flight number & number of flights from Mumbai from the
table flights.
ii) Arrange the contents of the table flights in the descending order of
destination.
iii)Increase the tax by 2% for the flights starting from Delhi.
iv)Display the flight number and fare to be paid for the flights from
Mumbai to Kochi using the tables, Flights & Fares, where the fare to
be paid =fare+fare*tax/100.
v) Display total no of source stations(eliminate duplicate) present in the
table.
vi)Display the fare for the flight for MUMBAI to BANGLORE
vii) Display the records of source stations started with letter ‘B’.
viii) Display the flight no. for which fare to be paid is less than 3000.
ix) Display total no. of flights available for each Airlines
x) Add a new column Dep_Time in the table Flight.
xi) Delete the record of flight no. IC301 from the table FARE.
xii) Increase the size of the column ‘source’ to 30 in the Table FLIGHT.

22 Consider the following tables WORKERS and DESIG. Write SQL commands for 14-Sep-22 12-Oct-22
the following statements.
Table: WORKERS
W_ID FIRSTNAM LASTNAME ADDRESS CITY
E
102 Sam Tones 33 Elm Street Paris
105 Sarah Ackerman 44 Street U.S.
144 Manila Sengupta 24 Street New York
210 George Smith 83 Street Howard
255 Mary Jones 842 vine Losantiville
300 Robert Samuel 9 fifth cross Washington
335 Henry Williams 12 Moore Street Boston
Table: DESIG
W_ID SALARY BENEFITS DESIGINATION
102 75000 15000 Manager
105 85000 25000 Director
144 70000 15000 Manager
210 50000 12500 Manager
255 45000 12000 Clerk
300 45000 10000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
451 28000 7500 Salesman

(i) Display W_ID , FIRSTNAME,ADDRESS and CITY of all employees living


in New York from the table WORKERS.
(ii) Display the content of workers table in ascending order of LASTNAME.
(iii) Display the FIRSTNAME,LASTNAME, and Total Salary of all clerks from
The tables WORKERS and DESIG, where Total salary is calculated as
salary + benefits.
(iv) Display firstname and salary of all MANAGERs.
(v) Display all detail of workers, whose name starts with ‘s’.

23 Consider the table given below and send the query through Python for the 12-Oct-22 19-Oct-22
following

TABLE: TEACHER
Code Teacher_Name Subject Qualification Designation Salary Experienc
001 R.P.Dixit English M.A. PGT 30000 15
002 S.N.Pandey Maths M.Sc. TGT 18000 12
003 Suhail Khan Maths M.Sc. PGT 28000 8
004 Sanjay Gautam Phy.Education M.P.Ed. PGT 25000 7
005 Sunil Singh Hindi Phd PGT 32000 9
006 Amar Baranwal Physics M.Sc. TGT 16000 6
007 Arun Pandey Chemistry M.Sc. PGT 25000 6
008 Vikas Tiwari Biology M.Sc. TGT 15000 8
009 Harmit Singh Accountancy M.Com. TGT 16000 4
010 Rakesh Tiwari Busi. Studies M.Com. PGT 24000 7
011 Santosh Kumar Fine Art MFA TGT 17000 10

(i) To Display the details of all the teachers in their decreasing order of experience.
(ii) To Show the sum of salary of PGT Teachers.
(iii) To display the Code , Name and Subject taught by the teachers whose qualification
is MSc.
(iv) To display the annual salary of each teacher with their code and name , assume
that the salary is given in table is per month
(v) To count the No. of teachers whose name start with letter ‘S’ OR letter ‘R’

24 Study the following tables DOCTOR and SALARY and send SQL commands 20-Oct-22 10-Nov-22
through Python for the questions
Table: DOCTOR
ID NAME DEPT SEX EXPERIENCE
101 Johan ENT M 12
104 Smith ORTHOPEDIC M 5
107 George CARDIOLOGY M 10
114 Lara SKIN F 3
109 K George MEDICINE F 9
105 Johnson ORTHOPEDIC M 10
117 Lucy ENT F 3
111 Bill MEDICINE F 12
130 Murphy ORTHOPEDIC M 15
Table: SALARY
ID BASIC ALLOWANCE CONSULTATION
101 12000 1000 300
104 23000 2300 500
107 32000 4000 500
114 12000 5200 100
109 42000 1700 200
105 18900 1690 300
130 21700 2600 300

(i) Display Name of all doctors who are in “MEDICINE” having more than 10
years experience from the table DOCTOR
(ii) Display the minimum ALLOWANCE of female doctors.
(iii) Display the highest consultation fee among all male doctors.

(iv) Display all the records of all doctors whose names is starting with ‘L’.

(v) To display the salary of each doctor with their id and name, assume that the
salary is sum of BASIC, ALLOWANCE, and CONSULTATION.

******************************

You might also like