RonishSingh XII-B Practical File CS
RonishSingh XII-B Practical File CS
COMPUTER SCIENCE
SESSION 2022-23
________________
Signature of Teacher
________________ ________________
Date: ___________
S. No. Topic Date Sign
PYTHON
1. Searching element in a list and displaying
frequency and location 12-04-22
MYSQL
1. Write SQL query to create and show a
database Employee. 04-10-22
Program to pass list to a function and double the odd values and half even
values of a list and display list element after changing
Practical-3
Input n numbers in tuple and pass it to function to count how many even and
odd numbers are entered
Practical-4
Practical-5
Program to function for key and value, and update value at that key in
dictionary entered by user
Pass a string to a function and count how many vowels are present in the string
Practical-6
Practical-7
Practical-8
Program to read a string, count and display the number of alphabets, digits,
spaces and special characters in the string
Practical-9
Python function to covert decimal to binary
Practical-10
Python function to find whether an entered number is perfect or not
Practical-11
Python function to check if the entered number is Armstrong or not
Practical-12
A menu-driven python program to implement stack operation
Practical-13
Python program to check whether a string is a palindrome or not using stack
Practical-14
Write a python program using function PUSH(Arr), where Arr is a list of
numbers. From this list push all numbers divisible by 5 or 7 into a stack
implemented by using a list. Display the stack if it has at least one element,
otherwise display appropriate error message.
Program to remove all the lines that contain character ‘a’ in a text file and write
it to another file.
Practical-15
Practical-16
Program to read and display a text file content line by line with each word
separated by #
Practical-17
Program to read characters one by one from keyboard, all lower-case characters
to be stored in file ‘lower’ and all uppercase in file ‘upper’ while other
characters should be stored in file ‘others’
Practical-18
Create a CSV file by entering user-id and password, read and search the
password for given user- id.
Practical-19
Create a binary file with roll no. and marks. Search for a given roll number and
update the marks as per given by user
Practical-20
Write a function RevText() to read a text file “ Story.txt” and print only word
starting with ‘I’ in reverse order . Example: If value in text file is: INDIA IS
MY COUNTRY Output will be: AIDNI SI MY COUNTRY
Practical-21
ABC infotech Pvt Ltd. Needs to create a database for their digital account.
Develop an interface that provides front-end interaction with Python. Write
Python program with separate user defined functions to perform the following
tasks:
1.Create a database abc_office
2.Create a table Employees with fields EmpId, Name, Age, Gender, and Salary
3.Insert data into table
Practical-22
For ABC infotech create a function to connect to the database and retrieve all
records and display total number of records
Practical-23
Write a program to read and fetch all the records from employees table having
salary more than 30000.
Practical-24
Write a program to increase the salary by 5% where employee id is 104.
SQL Practicals
Practical-1
Write SQL query to create and show a database Employee.
Practical-2
Write SQL query to open database Employee.
Practical-3
Write SQL query to create following Table name empl
Practical-4
Write SQL query to show the structure of the table.
Practical-5
Write SQL query to insert 10 records
Practical-6
Write SQL query to display all records from table empl.
Practical-7
Write SqL query to display EmpNo and Ename of all employees from the table
Practical-8
Display the details of employees whose name have only four letters
Practical-9
Display the details of all employees whose annual salary is between 25000 to
40000
Practical-10
Display name,job title and salary of employee who do not have manager
Practical-11
Display the name of employee whose name contains A as third letter
Practical-12
Display the name of employee whose name contains L as any letter
Practical-13
Display the name of departments. Each department should be displayed once
Practial-14
Queries for Aggregate functions- SUM(),AVG(),MIN(),MAX(),COUNT()
Practical-15
Display the names of employees in lowercase and uppercase
Practical-16
Display the position of the string ‘LE’ in the field job of table empl
Practical-17
Display all data of empl according to salary arrange in ascending order
Practical-18
Display department no., job and no. of employees in a particular job grouped by
department no., from empl
Practical-19
Display the jobs where the number of employees is less than 3