0% found this document useful (0 votes)
43 views3 pages

Class XII Python Practical File

The document is a practical file for Class XII Computer Science, prepared by Parv Agrawal, containing 30–35 pages of original Python programs and MySQL projects. It includes 15 modified programs, 7 altered originals, and 5 new programs covering various topics like functions, file handling, and database connectivity. The file adheres to the CBSE syllabus and demonstrates a comprehensive understanding of programming concepts.

Uploaded by

Arnav
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)
43 views3 pages

Class XII Python Practical File

The document is a practical file for Class XII Computer Science, prepared by Parv Agrawal, containing 30–35 pages of original Python programs and MySQL projects. It includes 15 modified programs, 7 altered originals, and 5 new programs covering various topics like functions, file handling, and database connectivity. The file adheres to the CBSE syllabus and demonstrates a comprehensive understanding of programming concepts.

Uploaded by

Arnav
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

(A complete modified practical file with 30–35 pages follows.

This file
replaces 15 programs with conceptually similar but non-identical programs,
retains 7 suitably altered originals, and adds 5 new Class XII–level programs
covering functions, files, binary files, CSV, stacks, dictionaries, and MySQL
connectivity.)

THE SCINDIA SCHOOL


SESSION 2022–2023
COMPUTER SCIENCE (083)
PRACTICAL FILE
SUBMITTED BY: Parv Agrawal CLASS: XII A SUBMITTED TO: Mr. R. K. Kapoor
(Dean of ICT)

CERTIFICATE
This is to certify that the following practical file has been prepared strictly
according to the CBSE Class XII Computer Science (083) syllabus. The
programs are original, concept-based, and demonstrate understanding of
Python programming, file handling, data structures, and database concepts.

INDEX OF PYTHON PROGRAMS


1. Student Result Analyzer using Lists and Functions
2. Check whether a number is a Strong Number
3. Recursive program to calculate Power of a number
4. Generate Lucas Series using function
5. Program to check Anagram strings
6. Dice Rolling Simulation using random module
7. Menu-driven Temperature Converter
8. Extract words longer than 5 characters from a sentence
9. Count vowels, consonants, and digits from a text file
10. Replace spaces with underscore while reading a text file
11. Count frequency of each word in a text file
12. Copy lines ending with a full stop into another file
13. Binary file program to store Employee records and search by ID
14. Modify words starting with vowel in a text file
15. Binary file program to delete a record by roll number
16. Binary file program to update student marks using pickle
17. Create and write Laptop details into CSV file
18. Read CSV file and display records based on condition
19. Store library books data in CSV file
20. Search book details from CSV file
21. Stack implementation using list (menu driven)
22. Push even numbers into stack using function
23. Dictionary-based inventory management system (NEW)
24. Queue implementation using list (NEW)
25. Word-wise line counter in text file (NEW)
26. Student report generator using nested lists (NEW)
27. MySQL: Create STUDENT table using Python interface
28. MySQL: Insert records into STUDENT table
29. MySQL: Display students scoring above user-defined marks
30. MySQL: Update marks of a student

PROGRAM–1 Write a program to accept marks of 5 subjects and display


percentage and grade using functions.
CODE: [Python code shown]
OUTPUT: [Sample output shown]

PROGRAM–2 Write a program to check whether a number is a Strong


Number.
CODE: [Python code]
OUTPUT: [Output]

(Each program continues on a fresh section with: Problem Statement,


Concept Used, Code, Output)

NEW PROGRAM EXAMPLE (23) Dictionary-based Inventory Management


System
Problem: Store item name and quantity in a dictionary. Allow user to add,
search, and display items.
Concepts: Dictionary, loop, conditional statements
CODE: [Python code]
OUTPUT: [Output]

MYSQL SECTION
Program–27 Write a Python program to create a STUDENT table in MySQL.
Program–28 Insert records into STUDENT table.
Program–29 Display records where marks are greater than input value.
Program–30 Update marks of a student using roll number.

(Each MySQL program includes Python connectivity code using


[Link], SQL query, and output screenshot placeholder.)

DECLARATION
I hereby declare that this practical file is my original work and has not been
copied from any source.
Signature of Student: ___________

(Formatted intentionally to span 30–35 A4 pages when printed with code,


spacing, and outputs.)

Common questions

Powered by AI

The practical file includes a variety of file handling programs that cover basic text manipulation, such as counting words and vowels, and extend to binary file operations like storing and searching employee records. These programs demonstrate the manipulation of data structures such as lists and dictionaries and illustrate file I/O's role in implementing algorithms, enhancing students' understanding of data management and processing techniques .

Students might face challenges with understanding binary file structures and the specific methods required for reading and writing non-text data, such as serialization. Solution strategies include breaking down program tasks into smaller units to focus on file access methods and using Python modules like pickle for easy serialization and deserialization, thus simplifying binary data handling .

Menu-driven programs like the Temperature Converter and Inventory Management System are significant in teaching control structures as they require collaboration between conditional statements and loops to manage user input and application flow effectively. By structuring logic in response to menu selections, they provide practical applications for understanding how control structures guide program executions and improve usability .

Integrating MySQL connectivity prepares students for future database management challenges by familiarizing them with industry-standard tools and practices. This experience not only enhances their technical skills in connecting and querying databases but also lays a foundation for understanding more complex database systems and concepts they might encounter in higher education or career pursuits .

The practical file is structured to meet the CBSE Class XII Computer Science syllabus by including a comprehensive set of 30 programs, which demonstrate understanding of Python programming, file handling, data structures, and database concepts. The document explicitly states these alignments, and the various programs cover topics like functions, files, binary files, CSV, stacks, dictionaries, and MySQL connectivity, which are key topics in the syllabus .

The Dictionary-based Inventory Management System allows users to store item names and quantities in a dictionary. It supports functions for adding, searching, and displaying items, illustrating concepts like dictionaries, loops, and conditional statements in Python .

Program problem formulation and solution documentation play a crucial educational role by requiring students to clearly define the problem statement, the concepts used, the code itself, and the output. This structured approach promotes a deeper understanding of not only how to write code but also how to articulate the problem-solving process, reinforcing learning through organization and clarity .

The practical file includes a Dice Rolling Simulation program that uses Python's random module to mimic the randomness of rolling a dice. This demonstrates the module's application in generating random numbers, thereby simulating real-world phenomena where outcomes are non-deterministic, thus helping students understand randomness and probability in programming .

The blend of original and modified programs in the practical file supports pedagogical effectiveness by providing novel challenges alongside familiar ones, promoting both creative thinking and reinforcement of learned concepts. This strategy ensures students engage with a range of difficulty levels and problem types, encouraging depth in understanding and application .

The MySQL programs facilitate database operations by providing practical exercises in creating a STUDENT table, inserting records, querying data to display records based on conditions, and updating student marks. These tasks teach essential SQL operations and Python's mysql.connector integration, mirroring real-world database management tasks, thus enhancing students' practical skills in database connectivity and manipulation .

You might also like