Skip to main content

Class 12th Computer Science Practical List

Program No.

Objective

Page No.

1

WAP in python to count occurrences of the alphabet ‘m’ from the text file “demo.txt”.

 

2

WAP in python to count the number of lines present in the text file “demo.txt” and also display its content line by line.

 

3

WAP in python to read all the content of a text file “demo.txt” line by line.

 

4

WAP in python to read the content of the text file “demo.txt” and display the count of alphabets, numbers, words and lines present in it.

 

5

WAP in python to copy the content of a text file “first.txt” to another new text file “second.txt”.

 

6

WAP in python to display those lines from the text file “story.txt” which contains the word “hello” in it.

 

7

WAP in python to read a text file “data.txt” line by line and display all its content with each word separated by “#”.

 

8

WAP in python to count the occurrences of the word “is” present in the text file “Story.txt”.

 

9

WAP in python to create a binary file “students.dat” and write the functions to add a student (roll-no, name, age, class, section) and display details of all the students from the file.

 

10

WAP in python to create a binary file “students.dat” and write the function to search a student, update the details of a student and delete a student from the file.

 

11

WAP in python to create a binary file “employees.dat” and write the functions to add an employee (eid, name, age, salary, dept) , update the employee details, delete an employee , search an employee and display the details of all the employees from the file.

 

12

WAP in python to create a binary file “cars.dat” and write the functions to add a new car (engine-no, model, make, price), update the car details, delete a car, search a car and display the details of all the cars from the file.

 

13

WAP in python to create a binary file “books.dat” and write the functions to add a new book (engine-no, model, make, price), update the book details, delete a book, search a book and display the details of all the books from the file.

 

14

WAP in python to create a CSV file “students.csv” and write the functions to add a student (roll-no, name, age, class, section) , update the student details, delete a student, search a student and display the details of all the student from the file.

 

15

WAP in python to create a CSV file “employees.csv” and write the functions to add an employee (eid, name, age, salary, dept) , update the employee details, delete an employee , search an employee and display the details of all the employees from the file.

 

16

WAP in python to create a CSV file “cars.csv” and write the functions to add a new car (engine-no, model, make, price), update the car details, delete a car, search a car and display the details of all the cars from the file.

 

17

WAP in python to create a CSV file “books.csv” and write the functions to add a new book (engine-no, model, make, price), update the book details, delete a book, search a book and display the details of all the books from the file.

 

18

Write a SQL query to create a database “ABC LIMITED” in MYSQL, create a table/relation EMPLOYEE (emp_id, emp_name, emp_age, emp_salary, emp_doj,emp_dept_id) with appropriate constraints and data types and also add details of Ten employees in this table.

 

19

Write a SQL query to display emp_id, emp_name and emp_salary of all the employees which are having salaries greater than Rs. 5000, working with emp_dept_id 101 or 102 and emp_age is less than 30 in descending order of their salaries.

 

20

      

 

21

 

 

22

Write SQL queries to find maximum, minimum, average, and total salary of the employees (using aggregate functions), working in the dept-id 101.

 

23

SQL Query Set - 1

Consider the following table ACTIVITY and write the SQL query for the following problem statements:

 

Table: ACTIVITY

ACode

ActivityName

Stadium

ParticipantsNum

PrizeMoney

ScheduleDate

1001

Relay 100x4

Star Annex

16

10000

23-Jan-2004

1002

High jump

Star Annex

10

12000

12-Dec-2003

1003

Shot Put

Super Power

12

8000

14-Feb-2004

1005

Long Jump

Star Annex

12

9000

01-Jan-2004

1008

Discuss Throw

Super Power

10

15000

19-Mar-2004

 

(a)       To display activities names, ACode in descending order of acode.

(b)       To display the activity name and ACodes in ascending order of ACode from the table ACTIVITY

(c)        To display the content of the Activity table whose ScheduleDate earlier than 01/01/2004 in ascending order of ParticipantsNum.

(d)       To display the maximum and minimum schedule date from the activity table

(e)       To display the sum of PrizeMoney for the Activities played in each of the Stadium separately.

 

 

 

24

SQL Query Set – 2

Consider the following table HOSPITAL and write the SQL query for the following problem statements:

 

No

Name

Age

Department

Dateofadmin

Charge

Gender

1

Arpit

62

Surgery

21/01/06

300

M

2

Zayana

18

ENT

12/12/05

250

F

3

Kareem

22

Orthopaedic

19/02/06

450

M

4

Abhilash

26

Surgery

24/11/06

300

M

5

Dhanya

24

ENT

20/10/06

350

F

6

Siju

23

Cardiology

10/10/06

800

M

7

Ankita

16

ENT

13/04/06

100

F

8

Divya

15

Cardiology

10/11/06

500

F

 

(a)       To show all information about the patients of cardiology department.

(b)       To list the names of female patients who are in ENT department.

(c)        To list names of all patients with their date of admission in ascending order of name.

(d)       To count the no of patients with age > 20.

(e)       To display the sum of charges of each department.

 

 

25

SQL Query Set - 3

Consider the following table TEACHER and write the SQL query for the following problem statements:

 

No

Name

Age

Department

Date of

Salary

Sex

1

Jigal

34

Computer

10/01/97

12000

M

2

Sharmila

31

History

24/03/98

20000

F

3

Sandeep

32

Maths

12/12/96

30000

M

4

Sangeeta

35

History

01/07/99

40000

F

5

Rakesh

42

Maths

05/09/97

25000

M

6

Shyam

50

History

27/02/97

30000

M

7

Shiv Om

44

Computer

25/02/97

21000

M

 

(a)       To show all information about the teacher of the History department.

(b)       To list the names of female teachers who are in Maths department

(c)        To list names of all teachers with their date of joining in ascending order of name.

(d)       To count the number of teachers with age>23.

(e)       To display the sum of SALARY of each department.

 

 

26

SQL Query Set - 4

 

Consider the following tables GRADUATE and write SQL query for the following problem statements

 

SNO

NAME

STIPEND

SUBJECT

AVERAGE

DIV

1

KARAN

400

PHYSICS

68

I

2

DIWAKAR

450

COMP. Sc.

68

I

3

DIVYA

300

CHEMISTRY

62

I

4

REKHA

350

PHYSICS

63

I

5

ARJUN

500

MATHS

70

I

6

SABINA

400

CHEMISTRY

55

II

7

JOHN

250

PHYSICS

64

I

8

ROBERT

450

MATHS

68

I

9

RUBINA

500

COMP. Sc.

62

I

10

VIKAS

400

MATHS

57

II

 

 

(a)       List the names of those students who have obtained DIV I sorted by NAME.

(b)       Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a year assuming that the STIPEND is paid every month.

(c)        To count the number of students who are either PHYSICS or COMPUTER SC graduates.

(d)       To insert a new row in the GRADUATE table as: 11,”KAJOL”, 300, “COMP. Sc.”, 75, 1

(e)       Display the average of AVERAGE in descending order of division.

 

27

WAP in python to create a table STUDENTS  (roll-no, name, age, class, section)  in MYSQL database and write the functions to add a student, update the student details, delete a student, search a student and display the details of all the student using SQL.

 

28

WAP in python to create a table EMPLOYEES  (emp_id, emp_name, emp_age, emp_salary, emp_dept_id, emp_doj) in MYSQL database and write the functions to add an employee , update the employee details, delete an employee , search an employee and display the details of all the employees using SQL.

 

29

WAP in python to create a table CARS (engine-no, model, make, price) in MYSQL database and write the functions to add a new car, update the car details, delete a car, search a car and display the details of all the cars using SQL.

 

30

WAP in python to create a table  BOOKS  (engine-no, model, make, price) in MYSQL database and write the functions to add a new book, update the book details, delete a book, search a book and display the details of all the books using SQL.

 


Comments