0% found this document useful (0 votes)
3 views

Python

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 views

Python

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
You are on page 1/ 3

PYTHON QUESTIONS:

1. Write a program to perform following operations into a binary file shoes.dat.

1. Add record
2. Display records
3. Search record
4. Exit
The structure of file content is: {‘shoe_id’:shoe_id,’name’: name ,’price’: price}

2. Write a menu driven program to perform following operations into a binary


file shoes.dat.
1. Add record
2. Search a record
3. Updating a record
4. Exit
The structure of file content is: {‘shoe_id’:shoe_id,’name’: name ,’price’: price}

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


file emp.dat.
1. Add record
2. Display records
3. Search record
4. Exit
The structure of file content is:
{‘empid’ :employee_id,’salary’:salary,’dob’:date_of_birth,’title’:job_title}
4. Write a menu driven program to perform following operations into a binary
file emp.dat.
1. Add record
2.Search a record
3. Update a record
4. Exit
The structure of file content is:
{‘empid’ :employee_id,’salary’:salary,’dob’:date_of_birth,’title’:job_title}
5. Write a menu driven program to perform following operations into a csv file
books.csv.
1. Write a record
2. Read all records
3.Search a record
4. Exit
The structure of file content is:book_no,book_name,author,price

6. Write a program to read the contents of a file text.txt and write the uppercase
and lower case letters in files ‘upper.txt’ and ‘lower.txt’ respectively. The
contents of text.txt are as follows:
7. Write a menu driven program to perform following operations in a stack.

1. Push an element
2. Pop an element
3. Display all elements
4.Exit

8. Write a program to read a file and count the number of uppercase, lowercase,
alphabets and digits in a text file ‘poem.txt’.

POEM.txt
1. Twinkle Twinkle Little Star
2. How I wonder what you are…
3. Up above the WORLD SO HIGH!

9. Write a program to sort a list using BUBBLE SORT.

You might also like