0% found this document useful (0 votes)
3 views1 page

Python File Handling and Data Structures

The document outlines a series of Python programming tasks, including file handling, data storage, and implementing data structures. Key tasks involve copying file contents, counting word frequency, analyzing text files for character types, and creating binary and CSV files for student and employee records. Additionally, it includes implementing a stack data structure for managing book details.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python File Handling and Data Structures

The document outlines a series of Python programming tasks, including file handling, data storage, and implementing data structures. Key tasks involve copying file contents, counting word frequency, analyzing text files for character types, and creating binary and CSV files for student and employee records. Additionally, it includes implementing a stack data structure for managing book details.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON PROGRAMS

1. Write a program that ask the user to read the contents of text file and copy
the contents to another file except for the lines starting with” #”
2. Program to ask user to enter some text into a text file and find the frequency
of a particular word.
3. Create a python program to read a text file – [Link] and display the
number of vowels/consonants/lower case/ upper case.
4. Write a program to ask the user to write the data to a text file to display file
contents line by line with each word separated by ‘#’
5. Program to create a binary file to store roll no and name of students. When
we search name, display name if roll no is found, else display appropriate
message.
6. Program to create a binary file to store roll no , name and marks of students
and display the details of all students
7. Program to create a CSV file to store Employee details (empno,
name,salary) and if we search any empno, if found it should display
corresponding name and salary else display appropriate message.
8. Write a python program using list to implement stack data structure and
perform the following operations:
Push(), b. Pop(), c. Display()
9. Write Write a python program to implement stack for book details
(book no , book name)

You might also like