# shammas-satti-00/python-basic-script architecture

> Architecture diagram of the GitHub repository shammas-satti-00/python-basic-script, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shammas-satti-00/python-basic-script
- Repository: https://github.com/shammas-satti-00/python-basic-script

## Overview

This repository combines standalone Python learning exercises with a separate Tkinter BMI calculator. The main user-to-result workflow is entering measurements, calculating and classifying BMI, then viewing or hearing the result; session history also feeds a trend chart. The chapter scripts are independent examples rather than a connected application. BMI behavior is shown from the sampled `bmi_cal.py`; exercise nodes summarize chapter contents. No persistent database is present.

Main entry points: [`bmi_cal.py`](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py) (Tkinter interface), [`Chp 1`](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%201) (Chapter 1 scripts), [`Chp 2`](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%202) (Chapter 2 scripts), [`Chp 3`](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%203) (Chapter 3 scripts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning exercises"]
  node_ch1["Chapter 1 scripts"]
  node_ch2["Chapter 2 scripts"]
  node_ch3["Chapter 3 scripts"]
end

subgraph group_bmi["BMI calculator"]
  node_interface["Tkinter interface<br/>[bmi_cal.py]"]
  node_bmi_calc["BMI calculation<br/>[bmi_cal.py]"]
  node_history["Session history<br/>[bmi_cal.py]"]
  node_charts["BMI charts<br/>[bmi_cal.py]"]
  node_speech["Voice output<br/>[bmi_cal.py]"]
end

node_user(("User"))
node_tts["Text-to-speech engine"]
node_plotting["Matplotlib"]

node_user -.->|"runs examples"| node_ch1
node_user -.->|"runs examples"| node_ch2
node_user -.->|"runs examples"| node_ch3
node_user -->|"enters measurements"| node_interface
node_interface -->|"invokes calculation"| node_bmi_calc
node_bmi_calc -->|"appends result"| node_history
node_bmi_calc -->|"requests narration"| node_speech
node_speech -->|"speaks text"| node_tts
node_interface -->|"opens charts"| node_charts
node_charts -->|"reads trend data"| node_history
node_charts -->|"plots trend"| node_plotting

click node_ch1 "https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%201"
click node_ch2 "https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%202"
click node_ch3 "https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%203"
click node_interface "https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py"
click node_bmi_calc "https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py"
click node_history "https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py"
click node_charts "https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py"
click node_speech "https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.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_ch1,node_ch2,node_ch3,node_user toneBlue
class node_interface,node_bmi_calc,node_history,node_charts,node_speech toneAmber
class node_tts,node_plotting toneIndigo
```

## Components

### Learning exercises

- [Chapter 1 scripts](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%201): `Chp 1`
- [Chapter 2 scripts](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%202): `Chp 2`
- [Chapter 3 scripts](https://github.com/shammas-satti-00/python-basic-script/tree/main/Chp%203): `Chp 3`

### BMI calculator

- [Tkinter interface](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py): `bmi_cal.py`
- [BMI calculation](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py): `bmi_cal.py`
- [Session history](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py): `bmi_cal.py`
- [BMI charts](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py): `bmi_cal.py`
- [Voice output](https://github.com/shammas-satti-00/python-basic-script/blob/main/bmi_cal.py): `bmi_cal.py`

### Other components

- **User**
- **Text-to-speech engine**
- **Matplotlib**

## Connections

- User → Chapter 1 scripts: runs examples (evidence: `README.md`)
- User → Chapter 2 scripts: runs examples (evidence: `README.md`)
- User → Chapter 3 scripts: runs examples (evidence: `README.md`)
- User → Tkinter interface: enters measurements (evidence: `bmi_cal.py`)
- Tkinter interface → BMI calculation: invokes calculation (evidence: `bmi_cal.py`)
- BMI calculation → Session history: appends result (evidence: `bmi_cal.py`)
- BMI calculation → Voice output: requests narration (evidence: `bmi_cal.py`)
- Voice output → Text-to-speech engine: speaks text (evidence: `bmi_cal.py`)
- Tkinter interface → BMI charts: opens charts (evidence: `bmi_cal.py`)
- BMI charts → Session history: reads trend data (evidence: `bmi_cal.py`)
- BMI charts → Matplotlib: plots trend (evidence: `bmi_cal.py`)
