This repository contains a comprehensive collection of Python solutions developed for a series of programming assignments. The projects cover fundamental algorithms, mathematical computations, data structure manipulation, and computational geometry.
The repository is organized into three main folders, each representing a specific assignment with its own unique focus:
1. Assignment 1 - Fundamentals & Mathematical Logic
Basic Python syntax, conditional statements, and numerical series.
- Quadratic Equation Solver: Finding real roots of 2nd-degree polynomials.
-
Approximating Euler's Number (
$e$ ): Using Taylor series expansion with optimized factorial calculations. - Large Factorial Analysis: Calculating the smallest integer whose factorial exceeds one million digits using logarithms.
- Geometric Patterns: Generating dynamic shapes using string repetition operators.
2. Assignment 2 - Data Structures & Optimization
Lists, loops, and algorithmic complexity.
- Fibonacci Sequences: Efficient generation and storage of the series in list format.
- Dynamic Data Handling: Managing real-time user input with custom termination flags.
-
Pythagorean Triplets:
-
Standard Approach: Baseline
$O(p^3)$ exhaustive search. -
Optimized Approach: Mathematical reduction to
$O(p^2)$ complexity.
-
Standard Approach: Baseline
- Advanced List Merging: Manual implementation of sorted merging and unique element filtering.
3. Assignment 3 - Functions, Recursion & Geometry
Modular programming, recursive functions, and linear algebra.
- Matrix Operations: Matrix-vector multiplication with dimension validation.
- Custom Data Processing: Manual implementation of
sum,max, andindexlogic (exam-style). - Signal Discretization: A custom implementation of the
linspacefunction. - Polygon Area Calculation:
- Recursive Method: Decomposing polygons into triangles via recursion.
- Iterative Method: Using loops for memory-efficient calculations.
- Python 3.x
- No external libraries required (uses Python Standard Library only).
These python scripts were developed as part of the coursework at the National and Kapodistrian University of Athens (NKUA).
- Author: Agapi Kallinikou
- Academic Year: 2022 - 2023