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

Python Program For Practical

The document outlines several Python programming tasks, including reading a text file to count character types, creating a dictionary for student records and writing to a binary file, and implementing a menu-driven program for managing shoe records in a binary file. It also includes a task for managing employee records using a stack and functions for writing and reading employee data from a binary file. Lastly, it describes creating a stack for student marks with functions to push and pop marks.

Uploaded by

sainivarun181
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)
3 views1 page

Python Program For Practical

The document outlines several Python programming tasks, including reading a text file to count character types, creating a dictionary for student records and writing to a binary file, and implementing a menu-driven program for managing shoe records in a binary file. It also includes a task for managing employee records using a stack and functions for writing and reading employee data from a binary file. Lastly, it describes creating a stack for student marks with functions to push and pop marks.

Uploaded by

sainivarun181
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

Python program

1. WAP to read a text file “[Link]” and display the number of vowels/
consonants/ uppercase/ lowercase characters in the file.

2. Write a python program to create a dictionary with roll number, name and
marks. Accept 5 records from the user and write them into a binary
[Link] may use dictionary as student={1:(“Asmita”,89.7),2:
(“Swati”,87.5)}

3. Write a menu driven program to perform following operations into


a binary file [Link]
1. Add record
2. Display records
3. Search record
4. Exit
The structure of file content is: [s_id, name, brand, type, price]
4. Write a menu-based program to add, delete and display the record of
Employee to perform the basic operation on stack using list in python.
Record of an employee contains: Employee Code, Employee Name and
Salary.

5. Write a function to WriteRec() to write the 5 Employee Records


(id, name, salary) in a binary file name “[Link]” and
ReadRec() function to read the all records from a binary file
“[Link]” and display them.

6.
Create a python program to create a stack of student’s marks .

• Write function PUSH to add marks in to the stack and


• Write function POP to remove the marks from stack and
display the same.

You might also like