0% found this document useful (0 votes)
11 views1 page

Assignment 4

Uploaded by

nutrimuch5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Assignment 4

Uploaded by

nutrimuch5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MEERUT INSTITUTE OF ENGINEERING AND TECHNOLOGY

NH-58, Delhi-Roorkee Highway, Baghpat Road, Meerut – 250 005 U.P.


Session 2024-25

Branch : B Tech –CSE/IT/CSIT/DS/CS/AI/AIML/IOT/CE Semester: III


Subject Name : Python Programming Subject Code : BCC 302
Submission Date: 25/11/2024

ASSIGNMENT -4

NOTE:- Attempt all questions.

S. NO. ALL QUESTION FROM CO-4 Course


CO-4 Implement file input/output operations in Python, including reading and writing Outcome
files, understanding file functions, and manipulating file pointers.
Q.1 Write a program to count no of words , letters and line in a text file . CO 4
Q.2 CO 4
Write a program to copy content of a file to another file .
Q.3 CO 4
Write a program to print only those words in a file which contain atleast 2 vowels
Input- ‘python is a programming language’ in txt file
Output –programming language
Q. 4 Describe in detail how exceptions are handled in Python. Give relevant Examples. CO 4
Q. 5 Write a program to read lines from a text file starting with "I" or "C" with a CO 4
suitable example.
Q. 6 Explain modes to open a file with a suitable example. CO 4
Q. 7 Write a program to print words having more than five characters in a text CO 4
file with a suitable example.

You might also like