Python Assignment 3 – Lists, Tuples, Sets, Dictionaries
Name: Ayush Ranjan Kumar
Registration No: 25155135048
This document is the page-format soft copy conversion of the PPT assignment.
SECTION A – LISTS
Q1. Personalized Marks Analyzer
Uses lists to store and analyze marks. Functions like max(), min(), and sum() are used to find highest, lowest, and
average marks.
Q2. Dynamic Shopping Cart
A menu-driven shopping cart using lists with add, remove, and view operations.
Q3. Duplicate Removal Without Set
Duplicates are removed manually using list checking instead of sets.
Q4. List Rotation Logic
Uses slicing to rotate a list left by N positions.
SECTION B – TUPLES
Q5. Student Record System
Stores fixed student data inside immutable tuples.
Q6. Tuple-Based Data Packing
Demonstrates tuple packing and unpacking.
Q7. Tuple Comparison
Compares tuples based on sum and maximum values.
Q8. Nested Tuple Analysis
Uses nested tuples for storing student marks.
SECTION C – SETS
Q9. Unique Visitor Tracker
Uses sets to automatically remove duplicate visitor names.
Q10. Common Subjects Finder
Uses set operations like intersection and union.
Q11. Random Number Filter
Filters unique even numbers using set comprehension.
Q12. Set Membership Checker
Demonstrates fast lookup operations in sets.
SECTION D – DICTIONARIES
Q13. Student Marks Dictionary
Stores subject-wise marks using key-value pairs.
Q14. Phone Directory System
Dictionary-based contact management system.
Q15. Word Frequency Counter
Counts word occurrences dynamically using dictionaries.
Q16. Employee Salary Manager
Analyzes employee salary data using dictionary traversal.
SECTION E – MIXED DATA STRUCTURES
Q17. Smart Data Processing System
Combines List, Tuple, Set, and Dictionary together in one program to process student data efficiently.
Summary Table
Data Structure Ordered Mutable Duplicates Best Use Case
List Yes Yes Allowed Sequential data
Tuple Yes No Allowed Fixed records
Set No Yes Not Allowed Unique items
Dictionary Yes Yes Keys Unique Key-value mapping