Programs For Practical FIle
Programs For Practical FIle
12.Write a program to input the value of x and n and print the sum of the
following series:
13. Read a text file line by line and display each word separated by a #.
14. Read a text file and display the number of
vowels/consonants/uppercase/lowercase characters in the file.
15. Remove all the lines that contain the character 'a' in a file and write it to
another file.
16.Create a binary file with name and roll number. Search for a given roll
number and display the name, if not found display appropriate message.
17. Create a binary file with roll number, name and marks. Input a roll
number and update the marks.
18.Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
19.Write a Python program to implement a stack using list.
20. Create a CSV file by entering user-id and password, read and search the
password for given userid.