Academic Project | Computer Engineering | CHARUSAT
Course: Python Programming (Jan 2022)
Student: Sahil Patel (20CE101)
Focus: Fundamental Python concepts and Data Structures
This repository contains practical assignments and exercises covering fundamental Python data structures and programming concepts. Created as part of academic coursework to demonstrate understanding of:
- Lists - Dynamic arrays and operations
- Tuples - Immutable sequences
- Sets - Unordered collections with unique elements
- Dictionaries - Key-value pair mappings
- Problem Solving - HackerRank and CodeChef challenges
- ✅ Data Structure Operations - CRUD operations on all structures
- ✅ Built-in Functions - len(), max(), min(), sum(), etc.
- ✅ Type Conversions - Converting between data structures
- ✅ Set Operations - Union, intersection, difference
- ✅ Dictionary Manipulation - Merging, updating, accessing
- ✅ Tuple Immutability - Understanding immutable sequences
- ✅ Problem Solving - Applying concepts to real problems
Python-Data-Structures/
├── Python practical assignment/ # All practice programs
│ ├── pythonprac_tupledatastruct.py # Tuple operations (68 lines)
│ ├── pythonprac_setdatastruct.py # Set operations (109 lines)
│ ├── pythonprac_dictionarydatastruct.py # Dictionary operations (66 lines)
│ ├── pipprogassignprac1.py # Character frequency counter
│ ├── pipprogassignprac2.py # String problems
│ ├── pipprogassignprac3.py # Numeric operations
│ ├── pipprogassignprac4.py # List operations
│ ├── pipprogassignprac5.py # Advanced list problems
│ ├── pipprogassignprac8.py # Exception handling
│ ├── pipprogassignprac9.py # OOP concepts
│ ├── pipprac5.py # Container water problem
│ ├── pipprac6.py # Unique numbers sum
│ └── pipprac7.py # Rectangle coordinates
├── main.py # PyCharm template
├── README.md # This file
├── .gitignore # Git ignore patterns
└── LICENSE # MIT License
Total: 13 Python programs | 525+ lines of code
- Python 3.x installed
- Basic understanding of programming concepts
- Text editor or IDE (PyCharm, VS Code, etc.)
# Clone the repository
git clone https://github.com/patelsahil2k03/Python-Data-Structures.git
# Navigate to directory
cd Python-Data-Structures
# Navigate to assignments folder
cd "Python practical assignment"
# Run any program
python3 pythonprac_tupledatastruct.pyTopics:
- Creating tuples with different data types
- Tuple indexing and slicing
- Adding items to tuples
- Converting tuple to string
- Finding tuple length
Sample Code:
# Create tuple with mixed datatypes
my_tuple = (1, "Hello", 3.4)
# Add items to tuple
intTuple = intTuple + (70,)
# Convert to string
str = ''.join(tup)Topics:
- Adding/removing set members
- Set operations (union, intersection, difference)
- Finding max/min in sets
- Common elements across data structures
Sample Code:
# Set operations
A = {0, 2, 4, 6, 8, 10}
B = {1, 2, 3, 4, 5, 6}
print("Union:", A | B)
print("Intersection:", A & B)
print("Difference:", A - B)Topics:
- Checking key existence
- Merging dictionaries
- Summing dictionary values
- Adding/updating keys
- Dictionary concatenation
Sample Code:
# Check if key exists
def is_key_present(x):
if x in d:
return True
return False
# Merge dictionaries
d1.update(d2)
# Sum all values
sum(dic.values())Calculate frequency of each character in a string.
Algorithm: Dictionary-based counting
Calculate maximum water a container can store.
Concept: Array manipulation, optimization
Count unique numbers whose sum equals K.
Concept: Set operations, mathematical logic
Change rectangle coordinates from (x, y) to (dx, dy).
Concept: Coordinate geometry, transformations
Different types of exceptions in Python.
Topics: try-except, error handling
Method overriding in derived classes.
Topics: Inheritance, polymorphism
- ✅ Data Structures - Mastered List, Tuple, Set, Dictionary
- ✅ Built-in Functions - Effective use of Python builtins
- ✅ Type Conversions - Flexible data structure transformations
- ✅ Problem Decomposition - Breaking complex problems into steps
- ✅ Code Organization - Structuring programs logically
- ✅ Documentation - Adding comments and explanations
- ✅ Testing - Verifying outputs with test cases
- ✅ Debugging - Identifying and fixing errors
Course: Python Programming Practical
Semester: 2nd Semester (Jan-Apr 2022)
Institution: CHARUSAT - CSPIT
Program: B.Tech Computer Engineering
Student ID: 20CE101
Purpose: Academic assignments to demonstrate understanding of Python fundamentals and data structures as part of Computer Engineering curriculum.
This repository represents foundational Python learning from 2022.
Journey Since Then:
- 📊 Built ML models with 98%+ accuracy using advanced Python
- 🚀 Deployed production systems serving 2M+ users
- 🤖 Mastered LangChain, TensorFlow, PyTorch
- ☁️ Developed AWS Lambda functions in Python
- 📚 Published 2 SCOPUS-indexed research papers
- 💼 Associate Software Engineer at Digiflux Technologies
Current Skillset: Python, JavaScript/TypeScript, AI/ML, Cloud, Full Stack
Portfolio: patelsahil2k03.github.io
- Start with basics - pythonprac_tupledatastruct.py
- Progress systematically - sets → dictionaries
- Practice problems - pipprogassignprac*.py files
- Experiment - Modify code, add features
- Understand concepts - Read comments, trace execution
- Quick syntax lookup for data structures
- Example implementations of common operations
- Problem-solving patterns
- Academic assignment structure
# Run tuple examples
python3 pythonprac_tupledatastruct.py
# Run set operations
python3 pythonprac_setdatastruct.py
# Run dictionary programs
python3 pythonprac_dictionarydatastruct.py
# Run problem-solving programs
python3 pipprogassignprac1.pyExpected Output: Each program prints results demonstrating the concept with test cases.
- Total Programs: 13
- Total Lines: 525+
- Data Structures: 4 (List, Tuple, Set, Dictionary)
- Concepts Covered: 20+
- Problems Solved: 10+
This is an academic learning repository. While direct contributions aren't expected, feedback and suggestions are welcome!
If you're a student learning Python:
- Feel free to fork and practice
- Add your own solutions
- Compare approaches
- Learn collaboratively
MIT License - See LICENSE file for details.
Free to use for educational purposes.
Sahil Patel
Email: patelsahil2k03@gmail.com
Portfolio: patelsahil2k03.github.io
GitHub: @patelsahil2k03
LinkedIn: sahil-patel-581226205
- CHARUSAT CSPIT - For excellent Python programming curriculum
- Course Instructors - For guidance and assignments
- Python Community - For comprehensive documentation
This repository documents the beginning of my Python journey - from basics to building production AI/ML systems.
Last Updated: March 2026