Programming in Python
Assignment 3
Subject Code: CIE-332T Submission date:30-04-2024
Q1. Write a Python function named `classify_path` that takes a file path as input and categorizes it
based on the following criteria:
1. If the path is absolute, return "Absolute path".
2. If the path is a directory, return "Directory".
3. If the path is a file, return "File".
4. If the path is neither a directory nor a file, return "Invalid path".
Q2. Write a python program to only 1. Write a file without deleting its previous data.
[Link] content of two files i.e file 2 should contain content of file 1 as well as file 2.
Q3Write a python program to create shelf file and store date in it using 3 different keys and print that
data and list of all the keys. Update the date stored in key 2 and delete data of key 3 again print data
of all keys.
Q4Write a Python function called `move_files` that takes two input directory paths and moves all
files and sub directory from the first directory to the second directory and then delete the first
directory.
[Link] is ZIP file and why do we need them? Write a program to extract zip file and get all
information about that zip file.