Text File Handling Set-2
2 Marks Questions
1. Write a python program to count and display no. of special characters
in a text file [Link].
2. Write a python program to count and display no. of lower case in a text
file [Link].
3. Write a python program to count and display no. of lower case vowels
in a text file [Link].
4. Write a python program to count and display no. of digits in a text file
[Link].
5. Write a python program to count and display no. of words in a text file
[Link].
6. Write a python program to count and display no. of spaces in a text file
[Link].
3 Marks Questions
1. Write a python program to count and display words ‘The’ present in a
text file [Link].
2. Write a python program to count and display words ending with ‘ch’ in
a text file [Link].
3. Write a python program to count and display no. of 3 character words
in a text file [Link].
4. Write a python program to count and display no. of the words starting
with vowels in a text file [Link].
5. Write a python program to display average word length in each line of
a text file [Link].
4 Marks Questions
1. Write a python program to open a text file [Link], copy all the
words with 3 characters into another file named [Link].
2. Write a Python program to open a text file [Link], copy all the
words starting with character ‘s’ or ‘S’ into another file named
[Link].
3. Write a Python program to open a text file [Link], replace word
‘and’ with &.
4. Write a Python program to open a text file [Link], copy all the
lines starting with the word ‘the’ into another file named [Link].
_________________