0% found this document useful (0 votes)
7 views2 pages

Python Assignment 2

This assignment for the U.G. program focuses on Python programming, covering various tasks such as organizing files, creating classes for geometric shapes, and developing a file backup tool. Students are required to implement exception handling, demonstrate object-oriented principles, and compare debugging techniques. The assignment spans from May 26, 2024, to June 5, 2024, and is graded out of a total of 50 marks.
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)
7 views2 pages

Python Assignment 2

This assignment for the U.G. program focuses on Python programming, covering various tasks such as organizing files, creating classes for geometric shapes, and developing a file backup tool. Students are required to implement exception handling, demonstrate object-oriented principles, and compare debugging techniques. The assignment spans from May 26, 2024, to June 5, 2024, and is graded out of a total of 50 marks.
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/ 2

Assignment – 2

Program : U.G. Scheme: 2022


Sem : II Start Date: 26/05/2024
Subject : Introduction to Python Programming End Date: 05/06/2024
Faculty : Dr. Kantharaju H C Max. Marks: 10

Q. No. Questions CL Marks

1 Develop a Python program to organize files in a directory using the shutil L3 10


and os modules. The program should walk through a directory tree and
move files into folders based on file extensions (e.g., .txt to "Text", .jpg
to "Images"). Include appropriate exception handling.

2 Write a Python program to create a class Rectangle with attributes length L3 10


and breadth. Include methods to calculate area and perimeter. Then,
create another class Cuboid (inheriting Rectangle) with an additional
attribute height, and override a method to compute volume. Demonstrate
object creation and method usage.
3 Compare the use of assert and logging in Python debugging. Write a L6 10
program that uses both in a simple calculator application. Provide
justification of which technique would be more beneficial in larger
applications and why.
4 Design a Python application that simulates a basic file backup tool. It L6 10
should compress selected files into a ZIP archive using zipfile module
and store it in a backup folder. Add features such as logging backup time
and handling exceptions.
5 Analyze a Python class-based approach to simulate a Library L4 10
Management System. The system should include classes for Book,
Member, and Library. Implement methods to add books, issue and return
books, and display member details. Discuss how object-oriented
principles such as encapsulation, inheritance, and polymorphism are
applied in your implementation.

Course Faculty
(Dr. Kantharaju H C)

You might also like