0% found this document useful (0 votes)
9 views34 pages

CS PractFile

This document is a practical file for Class XII A at Delhi Public School Hapur, authored by Avika Chaudhary for the academic year 2025-26. It includes an index of topics covered such as functions, file handling, stack operations, MySQL connectivity, and queries, along with various programming exercises and their outputs. The file serves as a comprehensive record of practical work and programming assignments completed during the course.

Uploaded by

coding.avika
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views34 pages

CS PractFile

This document is a practical file for Class XII A at Delhi Public School Hapur, authored by Avika Chaudhary for the academic year 2025-26. It includes an index of topics covered such as functions, file handling, stack operations, MySQL connectivity, and queries, along with various programming exercises and their outputs. The file serves as a comprehensive record of practical work and programming assignments completed during the course.

Uploaded by

coding.avika
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DELHI PUBLIC

SCHOOL HAPUR
PRACTICAL FILE 2025-26

Name – Avika Chaudhary


Class – XII A

________________________________________________________
__
HRT – Mr. Vivek Maheshwari Signature
(HRT)

1
INDEX
S. No. Topic Name No. of Q. Done Pages
1 XI Revision Tour 15 03-10
2 Functions 5 11-13
3a File Handling – text 4 14-16
3b File Handling - binary 4 17-20
3c File Handling - csv 4 21-23
4 Stack 3 24-25
5 MySQL Connectivity 6 26-30
6 MySQL Queries 14 31-34

1. XI Revision Tour

2
Program 1: Perfect Number Checker Program

Output:

Program 2 : Arithmetic Calculator

Output:

3
Program 3 : Checking Armstrong Number

Output:

Program 4 : Find factorial of the number

4
Output:

Program 5: Fibonacci Series Generator

Output:

Program 6: Palindrome Number

5
Output:

Program 7: Prime no. check

OUTPUT:

Program 8: Sum of elements of List

6
OUTPUT:

Program 9: Search word in string

OUTPUT:

7
Program 10: Celsius to Fahrenheit

OUTPUT:

Program 11: Replace vowels with @

OUTPUT:

Program 12: Diamond Pattern

8
OUTPUT:

Program 13: Finding roots of quadratic equation

OUTPUT:

9
Program 14: Triangle formation checker

OUTPUT:

Program 15:

OUTPUT:

10
2. Functions
Program 1: Factorial Using Recursion

OUTPUT:

Program 2: Find GCD

OUTPUT:

11
Program 3: Check Armstrong Number

OUTPUT:

Program 4: Count Vowels and Consonants

OUTPUT:

Program 5: Menu Driven Calculator

12
OUTPUT:

13
3a. File Handling (Text)
Program 1: Count lines, words, sentences

OUTPUT:

Program 2: Copy content from one to another file

OUTPUT:

Program 3: Find and Replace a word in a file

14
OUTPUT:

Program 4: Combine 2 files into one

OUTPUT:

15
16
3a. File Handling (Binary)
Program 1: Employee Record System

OUTPUT:

Program 2: Student Marks Update

17
OUTPUT:

Program 3: Library Book Finder

18
OUTPUT:

Program 4: Employee Management

19
OUTPUT:

3c. File Handling(CSV)

20
Program 1: Students Record

OUTPUT:

Program 2: Employee Data Append

21
OUTPUT:

Program 3: Average Salary Find

22
Program 4: Adding Employee to existing employee csv

4. Stack
23
Program 1: Push and Pop Operations

OUTPUT:

Program 2: Reverse String using Stack

Program 3: Check Balanced Paranthesis

24
5. mySQL Connectivity

25
Note: You are required to install require libraries beforing practically trying
out the below codes.

Program 1: Library Management

26
OUTPUT:

Program 2: Student Attendance – Mark Present/Absent

OUTPUT:

27
Program 3: Online Orders – Calculate Total Bill

OUTPUT:

Program 4: Employee Database – Increase Salary by 10%

28
OUTPUT:

Program 5: Railway Reservation – Check Available Seats

OUTPUT:

29
Program 6: Banking System – Withdraw Money

OUTPUT:

30
6. MySQL Queries

1. SELECT Query
1. Show all teacher names and their salaries.

2. Show all details of the Teacher table.

2. FROM + WHERE Query


1. Show details of teachers who belong to the Science department.

31
2. Show names of teachers whose salary is greater than 65000.

3. ORDER BY Query
1. Show teachers ordered by salary in descending order.

2. Show teachers ordered alphabetically by name.

4. GROUP BY Query
1. Show the number of teachers in each department.

2. Show the average salary of teachers in each department.

5. HAVING Query

32
1. Show departments having more than 1 teacher.

2. Show departments where the average salary is greater than 65000.

6. JOIN Query
(Teacher + Department tables)
1. Show teacher names along with their department HOD.

2. Show teacher names and department names.

7. Cartesian Product
1. Show all possible combinations of teachers and departments.

33
2. Show teacher IDs with all department HODs.

Remarks:

34

You might also like