Python Programming Unit 4 Notes AKTU (BCC302)
AKTU · BTECH · Semester 3, 4 · Python Programming · Unit 4 · Notes
AKTU Python Programming (BCC302) Unit 4 notes for B.Tech Semester 3/4 – File Operations & Regular Expressions. Topics: File Reading, File Writing, File…
A preview is available. Sign in or check access options in the reader for the complete resource.
Unit 4: File Operations & Regular Expressions – AKTU syllabus topics
- File Reading: read(), readline(), readlines()
- File Writing: write(), writelines()
- File Pointer Manipulation
- Regular Expressions
- Exceptions & Error Handling: try, except, finally, Assertions & raise
Most asked AKTU PYQ questions from Unit 4
- Q6a. What are file operations in Python? Explain the different modes used while opening a file. (7 marks, 2025-26)
- Q4b. Explain file handling modes in Python. (7 marks, 2024-25)
- Q1h. Discuss various file opening modes of python. (2 marks, 2022-23)
- Q6b. Discuss Exceptions and Assertions in python.How to handle Exceptions with Try-Finally? Explain 5 Built-in Exceptions with example. (10 marks, 2019-20)
- Q2d. What is the purpose of the seek() method in file handling? Demonstrate a program that copies content from one file to another. (7 marks, 2025-26)
- Qd. Write a program to reverse the contents of a file character by character, separating each character with a comma. (7 marks, 2024-25)
- Q2d. Construct a program to change the contents of the file by reversing each character separated by comma: Hello!! Output H,e,l,l,o,!,! (7 marks, 2023-24)
- Q2d. What are File input and output operations in Python Programming? (5 marks, 2021-22)
- Q5b. Discuss Exceptions and Assertions in Python. Explain with a suitable example. Explain any two built-in exceptions. (4 marks, 2021-22)
- Q6a. Discuss the concept of Iterators in python. Explain, how we can create text file in python? Describe python program to write the number of letters and digits in given input string into a File object. (10 marks, 2022-23)
AKTU paper codes: BCC302, BCC402, BCC302H, BCC402H, KNC302, KNC402
Other Python Programming units
Python Programming previous year papers
More Python Programming resources
More versions of this resource
Browse all notes · Semester 3 notes