Python Programming
CS10 Laboratory
Question 1: Stack from List
Create a list of 10 integers. Write a program with separate user-defined functions to perform the following operations:
- i) Push: Push the items of the list into a stack which are divisible by 5.
- ii) Pop & Display: Pop and display the content of the stack.
Question 2: Menu-driven Stack
Write a menu-driven program to handle stack operations such as Push, Pop, and Display.
Question 3: CSV File Operations
Write a menu-driven program to add and display records in a CSV file (students.csv) which
contains at least three student records with the following fields:
name(str)class(int)roll(int)marks(int)
Question 4: Binary File Operations
Write a menu-driven program to add and display records in a binary file which contains at least three product records with the following fields:
pname(str)price(float)qty(int)