Set 1
1. Create a Stack class in Python that supports the following operations:
1) Push(item): Adds an item to the stack.
2) Pop(): Removes the top item from the stack and displays the item.
3) Display(): Displays all the items currently in the stack, starting from the top.
4) IsEmpty(): Returns True if the stack is empty, otherwise False.
Set 2
1) Consider a binary file [Link] contains the structure [PID, Name, Category and
Price].
Write a menu driven Python program with the following function definitions.
a) ADD() – To add records into the binary file [Link]
b) DISPLAY() – To display the details of all the peripherals where Price>15000.
c) SEARCH(PID) -To search for the peripheral device which fall under output category
and display the same.
Set 3
1. Write a program to write data into binary file [Link] and display the records
of students who scored more than 95 marks.
Set 4
1. Write a Python program that performs the following tasks:
a) Accepts student data (Name, Roll Number, and Marks) from the user.
b) Stores the student data in a binary file called [Link] using the pickle
module.
c) After entering the data for 5 students, the program should display the records of
students who have scored more than 80 marks.
Each student should be represented by a class with attributes: name, roll_number, and marks