Lab Programs on File Handling
Lab Programs on File Handling
Write a python program to create a dictionary with the roll number, name and marks of ‘n’
students in a class and display the names of students who have scored marks above 75
2. Write a python program to create a file with the name of the file and content of the file entered
by the user. Also read the content of the file line by line and display each word separated by #
3. Write a python program to read a text file and display the number of vowels, consonants,
uppercase and lowercase characters in the file
4. Write a python program to remove all the lines that contain the character ‘a’ in a text file and
write it into another file
5. Write a python program to create a binary file with name and roll number. Search for a given
roll number and display the name, if not found, display the appropriate message
6. Write a python program to create a binary file which contains the student details and provide
options to update the student details based on the roll number entered by the user
7. Write a python program to create a CSV file which stores user id and password. Read and searcg
for the password for the given user id
8. Write a python menu driven program to add record, display record, and delete record of
employee in a CSV file