[go: up one dir, main page]

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

IT 11 Python Lab assignment

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

Dr. D. Y.

Patil Unitech Society’s


Dr. D.Y. PATIL INSTITUTE OF MANAGEMENT & RESEARCH
Sant Tukaram Nagar, Pimpri, Pune-411018
Recognized by the Savitribai Phule Pune University (SPPU-IMMP014220) AISHE CODE C-42109

Recipient of the "Best College Award" Accredited by NAAC with "A++ Grade” MBA & MCA Programme Accredited
of Savitribai Phule Pune University (CGPA 3.52) by NBA

MCA-I (Semester-I) A.Y. 2024-25

IT-11: Python Programming

Theory Assignment

Given Date: 24/11/2024 Submission Date:


10/12/2024

Unit -I

1. Write a Python program to find all Armstrong numbers in a given range using loops and
conditionals.
2. Implement a function to check if a given string is a palindrome without using built-in
functions.
3. Write a program to sort a list of dictionaries based on a key (e.g., age in a list of people).
4. Create a frequency counter for characters in a string using dictionaries.
5. Generate a pattern such as Pascal’s Triangle using nested loops.
6. Write a program to find the union, intersection, and difference between two sets.

Unit -II

1. Implement a nested function that calculates compound interest using non-local variables.
2. Write a program using lambda to filter even numbers from a list.
3. Create a generator function to yield Fibonacci numbers up to a certain limit.
4. Develop a custom Python module with functions for basic statistical operations (mean,
median, mode).
5. Write a program to handle file reading errors and log them to a separate file.
6. Create a custom exception class AgeException and use it to validate user input.
Unit III

1. Implement a class BankAccount with methods for deposit, withdrawal, and displaying
the account balance.
2. Develop a hierarchy of shapes (e.g., Shape, Circle, Rectangle) with area and perimeter
methods.
3. Overload the + operator for concatenating two custom string objects.
4. Create a static method to validate user credentials (e.g., email format, password length).
5. Implement a class Library containing a list of Book objects.
6. Demonstrate method overriding in a superclass-subclass relationship for a payment
system (e.g., Payment, CardPayment).
7. Write a program to validate a password that meets certain criteria (length, uppercase,
digit, special character).
8. Parse email addresses from a given text and classify them by domain.
9. Create threads to perform independent tasks such as downloading multiple files
simultaneously.
10. Write a Python program to create two threads. The first thread will print even numbers,
and the second thread will print odd numbers. Demonstrate the concept of multithreading.
11. Use multithreading to compute factorials of multiple numbers and log the results into a
file.

Unit IV

1. Develop a Python program to create, read, update, and delete documents in a MongoDB
collection.
2. Write a program to insert valid data into MongoDB using exception handling for errors.
3. Use MongoDB’s aggregation pipeline to find the average salary of employees in a
collection.

Unit V

1. Create a Django project with models for Product and Category, along with views to
display them on a webpage.
2. Implement user login, logout, and registration functionality in a Django application.
3. Build a REST API for a task management system where users can create, update, and
delete tasks.

You might also like