You are on page 1of 27

Doon INTERNATIONAL SCHOOL

COMPUTER SCIENCE
SESSION : 2022-2023

Name : Ansh Kandwal


Class : 12TH A
Board Roll No. :

1
PYTHON SEGMENT : STACKS
Implementation of Stack Using list

PRACTICAL- 1
Write a Menu Driven Program to IMPLEMENT A STACK using LIST .

2
3
OUTPUT :

4
5
PRACTICAL- 2
Write a program to create a Stack for storing only odd numbers out of
all the numbers entered by the user. Display the content of the Stack
along with the largest odd number in the Stack. (Hint. Keep popping

6
out the elements from stack and maintain the largest element retrieved
so far in a variable. Repeat till Stack is empty) .

7
OUTPUT :

8
MYSQL SEGMENT

PRACTICAL- 1
Create a database 'Emp_data' on the database server, show the list
of databases and Select the database you want to Use. mysql >
CREATE DATABASE Emp_data;

9
PRACTICAL- 2
Create the following table named 'Dept' and 'Emp' with appropriate
data type, size and constraint(s). Show its table structure also.

10
PRACTICAL- 3
Insert few records/tuples into the table. Verify the entered records .

11
PRACTICAL- 4
Display all the information of employees whose job is NEITHER
Salesman NOR Clerk.

12
PRACTICAL- 5
Display the details of all the employees whose Hiredate is after April
1991. (consider the SQL’s standard date format)

PRACTICAL- 6
Display the details of all the employees whose Hiredate is maximum.
(consider the SQL’s standard date format)

PRACTICAL- 7
Display all information of Salesman and Manager in descending order
salary wise.
METHOD 1

13
METHOD 2

PRACTICAL- 8
List all employees whose name has the character ‘a’.

PRACTICAL- 9
Display Name and Salary of those Employees whose Salary is in the range
40000 and 100000 ( both are inclusive).

14
PRACTICAL- 10
Display average Salary, highest Salary and total no. of Employees for each
department.

PRACTICAL- 11
Display total No. of Clerk, Manager, Salesman and President along with their
Average Salary.

15
PRACTICAL- 12
Increase the Salary of 'Clerk' by 5% Sal and verify the updated rows.

PRACTICAL- 13
Add a new column named Address. ( Take the data type and size
yourself) then Delete the column Address and verify the table
structure.

16
PRACTICAL- 14
Display Ename, Job, salary and Hiredate of Analysts, President whose
Salary is below 120000.

17
PRACTICAL- 15
Display UNIQUE Jobs.

PRACTICAL- 16
Display Job and Highest Salary of Employee of each type of Job , but
only for Clerk and Manager.

18
19
PRACTICAL- 17
Display Job and Highest Salary of Employee of each type of Job, but
only for Clerk, Manager and Analyst arranged in Ascending order of
job.

PRACTICAL- 1

20
Write a Program to show MySQL Database connectivity in Python .

21
PRACTICAL- 2
WAP to show the No. of tables in selected Database being used and fetch
records from all the tables present using MySQL Database connectivity
in Python.

22
PRACTICAL- 3
WAP to Create a database and table in it. Then try adding records to it by
taking input from user using knowledge of parameterized query (MySQL
Database connectivity in Python ).

23
# INPUT GIVEN BY USER and GETTING REFLECTED IN THE TABLE

PRACTICAL- 4
WAP to Show how to UPDATE and DELETE a record in a Relation present
in the current database being used, using MySQL Database connectivity in
Python.

24
# UPDATE 1

25
# UPDATE 2

26
# DELETE

# RECORD DELETED

27

You might also like