C - Sc. - Practical File For 2022 - HY
C - Sc. - Practical File For 2022 - HY
Class XIl
Subject : Computer Science
1. Create a text file 'Practice.txt' and write five lines in it & then display number of alphabets,
digits and special characters present in it.
2. Read a text file ‘Practice.txt' and display all words which having four characters long.
3. Read a text file'Practice.txt' and display all the lines which are begins with vowels.
4. Develop a program to implementation of file pointer seek and tell function.
5. A binary file 'Mobile.dat' has structure [Model, Company, Price].
(i) Write a user defined function Add_Mobile() in Python to input data for N number of
mobiles and add it to a binary file ‘Mobile.dat'
(ii) Write a function Count_Company(company) in Python which accepts the company name
as parameter and counts and print the number of mobiles by the given company stored in
the binary file 'Mobile.dat’.
Also call the functions from the main segment so that program should execute successfully.
6. Create a binary file 'report.bin'with name, roll number and marks of N students. Search
for a given roll number and update the marks.
7. Develop a program to delete a record from the binary file 'report.bin', which roll number
is entered by the user.
8. A binary file 'Salary.bin' has structure [Empno,Name,Salary]
Develop a program which stores N number of data in 'Salary.bin’, calculates and display
total salary remitted to its employees and to display the number of employees who are
drawing a salary of more than 740000 per month.
9. Write a program to create a CSV file 'Emp.csv'and store empno,name andsalary. Search
any empno and display his/her name and salary. Display an appropriate message if not
found.
10. Develop a program to search for a given empno from 'Emp.csv' and update the salary
by 1000.
|
SQL
1. Create a database 'Emp_data' on the database server, show the list of databases and
Select the database you want to Use.
2. Create the following tables named ‘Dept’ and ‘Emp’ as follows with appropriate data type,
size and constraint(s).
Dept
Deptno dname Location
10 Accounts Delhi
20 Sales Mumbai
30 HRD Pune
Emp
Empno Ename Job MGR HireDate | Sal Comm deptno
101 Amar Clerk 7009 18-07-16 | 30000 NULL 20
107 Sanjay Salesman | 7124 28-05-18 | 32000 2400 30
144 Sam Manager 8133 16-12-19 | 52000 NULL 10
109 Raj Salesman | 7500 14-06-16 | 37000 3000 30
160 Mou Manager 8167 15-07-17 | 51000 NULL 20
117 Hema Clerk 2157 04-05-20 | 28000 NULL 10
150 Dilip Accountant | 7676 11-09-17 | 41000 NULL 20
133 Suraj Salesman | 8348 12-12-20 | 28000 1800 10