# korepupavankumar/ai-quiz-generator architecture

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

- Interactive diagram: https://gitdiagram.com/korepupavankumar/ai-quiz-generator
- Repository: https://github.com/korepupavankumar/ai-quiz-generator

## Overview

Smart Quiz Challenge is a small interactive command-line quiz. A player enters a name, answers a fixed set of questions, receives correctness feedback and a final performance message, and the program appends their score to a file. The questions are defined in quiz.py; questions.txt is present in the tree but is not used in the sampled source. The graph focuses on that observed runtime workflow.

Main entry points: [`quiz.py`](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py) (Quiz runner), [`scores.txt`](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/scores.txt) (Score history)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_player(("Player"))
node_quiz["Quiz runner<br/>[quiz.py]"]
node_questions["Question set<br/>[quiz.py]"]
node_grading["Answer grading<br/>[quiz.py]"]
node_results["Results and feedback<br/>[quiz.py]"]
node_scores[("Score history<br/>[scores.txt]")]

node_player -->|"starts and names"| node_quiz
node_quiz -->|"iterates"| node_questions
node_quiz -->|"asks questions"| node_player
node_player -->|"submits answers"| node_quiz
node_quiz -->|"checks answers"| node_grading
node_grading -->|"updates score"| node_results
node_quiz -->|"shows feedback"| node_player
node_quiz -->|"appends score"| node_scores
node_quiz -->|"confirms save"| node_player

click node_quiz "https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py"
click node_questions "https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py"
click node_grading "https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py"
click node_results "https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py"
click node_scores "https://github.com/korepupavankumar/ai-quiz-generator/blob/main/scores.txt"

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_player toneIndigo
class node_quiz,node_questions,node_grading,node_results toneTeal
class node_scores toneAmber
```

## Components

### Other components

- **Player**
- [Quiz runner](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py): `quiz.py`
- [Question set](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py): `quiz.py`
- [Answer grading](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py): `quiz.py`
- [Results and feedback](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/quiz.py): `quiz.py`
- [Score history](https://github.com/korepupavankumar/ai-quiz-generator/blob/main/scores.txt): `scores.txt`

## Connections

- Player → Quiz runner: starts and names
- Quiz runner → Question set: iterates
- Quiz runner → Player: asks questions
- Player → Quiz runner: submits answers
- Quiz runner → Answer grading: checks answers
- Answer grading → Results and feedback: updates score
- Quiz runner → Player: shows feedback
- Quiz runner → Score history: appends score
- Quiz runner → Player: confirms save
