0% found this document useful (0 votes)
23 views3 pages

Python File Operations and Programs

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)
23 views3 pages

Python File Operations and Programs

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 QUESTIONS:

1. Write a 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: {‘shoe_id’:shoe_id,’name’: name ,’price’: price}

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


file [Link].
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 [Link].
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 [Link].
1. Add record
[Link] 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
[Link].
1. Write a record
2. Read all records
[Link] 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 [Link] and write the uppercase
and lower case letters in files ‘[Link]’ and ‘[Link]’ respectively. The
contents of [Link] 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
[Link]

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

[Link]
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