# thaissantanna/exercicio_funcoes architecture

> Architecture diagram of the GitHub repository thaissantanna/exercicio_funcoes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thaissantanna/exercicio_funcoes
- Repository: https://github.com/thaissantanna/exercicio_funcoes

## Overview

##### Project type and purpose
- This is a collection of standalone Python exercise scripts—no frontend, backend, or persistence layer.
- Purpose: implement and test small single-responsibility functions (string utilities, geometric calculators, algorithm–based exercises).

##### File structure
- Root contains nine `def_*.py` modules, each implementing exactly one utility function or algorithm, plus a README.
- No configuration, no build artifacts, no tests directory—these scripts are executed directly by the Python runtime.

##### Main components
a. User / CLI
- The person or test harness that invokes a given script.
b. Python Interpreter (v3.x)
- The runtime that loads and executes the script.
c. Function Modules (grouped by category)
1. Geometric Calculations
– def_area_triangulo.py
– def_area_quadrilatero.py
– def_perimetro_triangulo.py
– def_perimetro_quadrilatero.py
– def_quadrado.py
2. String / Algorithmic Utilities
– def_anagrama.py
– def_palindromo.py
– def_reverse.py
– def_tamanho_palavras.py
3. Special Algorithm
– def_torre_hanoi.py
d. (Optional) Input/Output Medium
- STDIN/STDOUT or simple parameters/print statements

##### Relationships and data flow
- User → [invoke] → Python Interpreter
- Interpreter → [import & execute] → Specific Function Module
- Module → [compute] → returns result to Interpreter → [print] → User
- Every module is isolated: no inter-module calls, no shared state.

##### Architectural patterns and principles
- Single Responsibility: each script does one thing.
- Separation by domain: group scripts by functional concerns (geometry vs. string).
- No persistence or external dependencies.

##### Technologies & frameworks
- Python 3 standard library only.
- CLI invocation (e.g., `python def_palindromo.py`).

## Diagram (Mermaid)

```mermaid
graph TB
    %% User and Interpreter
    User["🖥️ User / CLI"]:::user
    Interpreter["🐍 Python Interpreter (v3.x)"]:::interpreter

    %% Geometric Calculations
    subgraph "Geometric Calculations"
        direction TB
        areaTri["def_area_triangulo.py<br/>Calculates triangle area"]:::geometric
        areaQuad["def_area_quadrilatero.py<br/>Calculates quadrilateral area"]:::geometric
        periTri["def_perimetro_triangulo.py<br/>Calculates triangle perimeter"]:::geometric
        periQuad["def_perimetro_quadrilatero.py<br/>Calculates quadrilateral perimeter"]:::geometric
        quadrado["def_quadrado.py<br/>Calculates square properties"]:::geometric
    end

    %% String / Algorithmic Utilities
    subgraph "String / Algorithmic Utilities"
        direction TB
        anagrama["def_anagrama.py<br/>Anagram checker"]:::string
        palindromo["def_palindromo.py<br/>Palindrome checker"]:::string
        reverse["def_reverse.py<br/>String reverser"]:::string
        tamanho["def_tamanho_palavras.py<br/>Word length counter"]:::string
    end

    %% Special Algorithm
    subgraph "Special Algorithm"
        direction TB
        torre["def_torre_hanoi.py<br/>Tower of Hanoi solver"]:::special
    end

    %% Documentation
    README["README.md<br/>Project documentation"]:::docs

    %% Relationships
    User -->|"invokes"| Interpreter
    Interpreter -->|"imports & executes"| areaTri
    Interpreter -->|"imports & executes"| areaQuad
    Interpreter -->|"imports & executes"| periTri
    Interpreter -->|"imports & executes"| periQuad
    Interpreter -->|"imports & executes"| quadrado
    Interpreter -->|"imports & executes"| anagrama
    Interpreter -->|"imports & executes"| palindromo
    Interpreter -->|"imports & executes"| reverse
    Interpreter -->|"imports & executes"| tamanho
    Interpreter -->|"imports & executes"| torre

    areaTri -->|"returns result"| Interpreter
    areaQuad -->|"returns result"| Interpreter
    periTri -->|"returns result"| Interpreter
    periQuad -->|"returns result"| Interpreter
    quadrado -->|"returns result"| Interpreter
    anagrama -->|"returns result"| Interpreter
    palindromo -->|"returns result"| Interpreter
    reverse -->|"returns result"| Interpreter
    tamanho -->|"returns result"| Interpreter
    torre -->|"returns result"| Interpreter

    Interpreter -->|"prints"| User

    %% Click Events
    click areaTri "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_area_triangulo.py"
    click areaQuad "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_area_quadrilatero.py"
    click periTri "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_perimetro_triangulo.py"
    click periQuad "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_perimetro_quadrilatero.py"
    click quadrado "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_quadrado.py"
    click anagrama "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_anagrama.py"
    click palindromo "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_palindromo.py"
    click reverse "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_reverse.py"
    click tamanho "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_tamanho_palavras.py"
    click torre "https://github.com/thaissantanna/exercicio_funcoes/blob/main/def_torre_hanoi.py"
    click README "https://github.com/thaissantanna/exercicio_funcoes/blob/main/README.md"

    %% Styles
    classDef geometric fill:#ADD8E6,stroke:#000
    classDef string fill:#90EE90,stroke:#000
    classDef special fill:#FFE4B5,stroke:#000
    classDef interpreter fill:#D3D3D3,stroke:#000
    classDef user fill:#F0E68C,stroke:#000
    classDef docs fill:#FFFFFF,stroke:#000,stroke-dasharray: 5 5
```
