# angel76846729-cmd/ejercicios-unidad-4-202607066 architecture

> Architecture diagram of the GitHub repository angel76846729-cmd/ejercicios-unidad-4-202607066, 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/angel76846729-cmd/ejercicios-unidad-4-202607066
- Repository: https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066

## Overview

This repository is a set of independent Tkinter practice applications, not one integrated product. The clearest persistence workflow is entering a name and score in the score window, which initializes the SQLite table and saves the submitted score. Other exercises display text, add numbers, collect or validate form data, show sample player rankings, or load and validate questions from a JSON file. The excerpts show no shared launcher or connections among these exercises; the graph keeps them separate. The question loader's selected JSON file is external and need not be `preguntas.json`.

Main entry points: [`db.py`](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/db.py) (Score database), [`main.py`](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/main.py) (Score form), [`ejerciciocuatroonce.py`](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroonce.py) (Question loader), [`ejerciciocuatroseis.py`](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroseis.py) (Form display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scores["Score saving"]
  node_score_window["Score form<br/>[main.py]"]
  node_score_db[("Score database<br/>[db.py]")]
end

subgraph group_questions["Question import"]
  node_question_loader["Question loader"]
end

subgraph group_exercises["Standalone exercises"]
  node_form_display["Form display"]
  node_form_echo["Form echo"]
  node_form_validation["Form validation"]
  node_sum_numbers["Number adder"]
  node_text_display["Text display"]
  node_player_table["Sample rankings"]
  node_basic_window["Basic window"]
  node_label_window["Label window"]
end

node_user(("User"))
node_json_file["Selected JSON"]

node_user -.->|"enters score"| node_score_window
node_score_window -->|"creates table"| node_score_db
node_score_window -->|"saves score"| node_score_db
node_score_db -->|"stores scores"| node_score_db
node_user -.->|"chooses file"| node_question_loader
node_question_loader -->|"reads questions"| node_json_file
node_user -.->|"submits form"| node_form_display
node_user -.->|"submits form"| node_form_echo
node_user -.->|"submits form"| node_form_validation
node_user -.->|"enters numbers"| node_sum_numbers
node_user -.->|"enters text"| node_text_display
node_user -.->|"views rankings"| node_player_table
node_user -.->|"opens window"| node_basic_window
node_user -.->|"opens window"| node_label_window

click node_score_window "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/main.py"
click node_score_db "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/db.py"
click node_question_loader "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroonce.py"
click node_form_display "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroseis.py"
click node_form_echo "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrocinco.py"
click node_form_validation "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroocho.py"
click node_sum_numbers "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrocuatro.py"
click node_text_display "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrotres.py"
click node_player_table "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatronueve.py"
click node_basic_window "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrouno.py"
click node_label_window "https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrodos.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_score_window,node_score_db,node_user toneBlue
class node_question_loader toneAmber
class node_form_display,node_form_echo,node_form_validation,node_sum_numbers,node_text_display,node_player_table,node_basic_window,node_label_window toneMint
class node_json_file toneIndigo
```

## Components

### Score saving

- [Score form](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/main.py): `main.py`
- [Score database](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/db.py): `db.py`

### Question import

- [Question loader](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroonce.py): `ejerciciocuatroonce.py`

### Standalone exercises

- [Form display](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroseis.py): `ejerciciocuatroseis.py`
- [Form echo](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrocinco.py): `ejerciciocuatrocinco.py`
- [Form validation](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatroocho.py): `ejerciciocuatroocho.py`
- [Number adder](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrocuatro.py): `ejerciciocuatrocuatro.py`
- [Text display](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrotres.py): `ejerciciocuatrotres.py`
- [Sample rankings](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatronueve.py): `ejerciciocuatronueve.py`
- [Basic window](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrouno.py): `ejerciciocuatrouno.py`
- [Label window](https://github.com/angel76846729-cmd/ejercicios-unidad-4-202607066/blob/main/ejerciciocuatrodos.py): `ejerciciocuatrodos.py`

### Other components

- **User**
- **Selected JSON**

## Connections

- User → Score form: enters score
- Score form → Score database: creates table (evidence: `main.py`)
- Score form → Score database: saves score (evidence: `main.py`)
- Score database → Score database: stores scores (evidence: `db.py`)
- User → Question loader: chooses file
- Question loader → Selected JSON: reads questions (evidence: `ejerciciocuatroonce.py`)
- User → Form display: submits form
- User → Form echo: submits form
- User → Form validation: submits form
- User → Number adder: enters numbers
- User → Text display: enters text
- User → Sample rankings: views rankings
- User → Basic window: opens window
- User → Label window: opens window
