# ai-patrick/trentorch-solutions architecture

> Architecture diagram of the GitHub repository ai-patrick/trentorch-solutions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ai-patrick/trentorch-solutions
- Repository: https://github.com/ai-patrick/trentorch-solutions

## Overview

This repository is a small collection of Python learning exercises, not an application with a shared runtime workflow. It demonstrates basic functions, variables, arithmetic, swapping, and passing a function as an argument. The snippets define callable functions but show no caller or external service; the only visible internal interaction is apply_twice invoking its supplied callback.

Main entry points: [`python-what-a-function-is/solution.py`](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py) (Apply twice)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_compute_total["Compute total<br/>[solution.py]"]
node_swap_two_variables["Swap variables<br/>[solution.py]"]
node_is_even["Check evenness<br/>[solution.py]"]
node_greet_formal["Formal greeting<br/>[solution.py]"]
node_apply_twice["Apply twice<br/>[solution.py]"]
node_callback["Supplied function"]

node_apply_twice -->|"calls twice"| node_callback

click node_compute_total "https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-variable-is/solution.py"
click node_swap_two_variables "https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-variable-is/solution.py"
click node_is_even "https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py"
click node_greet_formal "https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py"
click node_apply_twice "https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_compute_total,node_swap_two_variables,node_is_even,node_greet_formal,node_apply_twice toneTeal
class node_callback toneIndigo
```

## Components

### Other components

- [Compute total](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-variable-is/solution.py): `python-what-a-variable-is/solution.py`
- [Swap variables](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-variable-is/solution.py): `python-what-a-variable-is/solution.py`
- [Check evenness](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py): `python-what-a-function-is/solution.py`
- [Formal greeting](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py): `python-what-a-function-is/solution.py`
- [Apply twice](https://github.com/ai-patrick/trentorch-solutions/blob/main/python-what-a-function-is/solution.py): `python-what-a-function-is/solution.py`
- **Supplied function**

## Connections

- Apply twice → Supplied function: calls twice (evidence: `python-what-a-function-is/solution.py`)
