How johnnyalex77/prueba_aws works
Purpose and entry point
A standalone, offline Python desktop practice quiz for AWS Academy Cloud Architecting. The executable entry point is app/main.py; it loads a local question bank from app/questions.json and presents a Tkinter GUI. There is no server, database, web client, or AWS runtime integration.
Application shell and UI control
app/main.py owns the Tkinter application lifecycle, window/view construction, and user-driven control flow. The interface renders one single-choice question at a time, exposes answer radio buttons, progress, and Previous/Next/Clear/Finish actions. UI state changes drive quiz navigation and eventual result/review windows.
Question-bank ingestion and validation boundary
app/questions.json is the durable content boundary. It contains question objects with identifiers, prompt text, options, a single correct answer letter, and optional justification. app/main.py reads this local JSON at startup; failure to locate or parse it prevents normal quiz initialization.
Quiz session initialization
At launch, app/main.py randomly selects 25 questions from the local bank. This selected set defines the in-memory session scope, so each run can present a different exam while leaving app/questions.json unchanged. The application requires a bank large enough to support the fixed sample size.
Answer state and navigation
app/main.py maintains the current question index and an in-memory mapping of selected answers. Choosing an option saves it automatically; navigation restores the saved value for each question. Clearing removes only the current answer. This state is transient and is not described as being persisted across application executions.
Scoring and review
Finishing the session in app/main.py evaluates recorded answers against each question’s correct field. It displays the aggregate score and opens a detailed review view covering all sampled questions, selected answers, correct answers, and available justifications. This is the primary assessment boundary: content data enters from JSON, while score and review data are computed locally.
PDF export and dependencies
The review flow can export a PDF report from app/main.py. This capability depends on ReportLab, declared or installable through app/requirements.txt; it is optional and should fail or be unavailable without that package. Python 3.6+ and Tkinter are the material runtime requirements. All normal quiz operation remains local and offline.
Main entry points: main.py Quiz state · questions.json Question bank · requirements.txt Dependencies
Components 11
Desktop runtime
- Tkinter app controller · Owns lifecycle, views, and quiz control flow.
app/main.py - Tkinter GUI · Renders questions, controls, progress, and result views.
Local content
- Question bank · Durable questions, options, correct answers, and justifications.
app/questions.json - Dependencies · Declares ReportLab for optional PDF export.
app/requirements.txt
Quiz session
- 25-question sampler · Randomly selects the fixed exam set at launch.
app/main.py - Quiz state · Tracks current index and selected answers.
app/main.py - Navigation actions · Previous, Next, and Clear update or restore session state.
app/main.py
Assessment output
- Scoring engine · Compares recorded answers with each question's correct field.
app/main.py - Results and review · Shows aggregate score and per-question review.
app/main.py - PDF report export · Exports the review report when ReportLab is available.
app/main.py - ReportLab
Connections 13
- Tkinter app controller → Tkinter GUI: creates views
- Tkinter app controller → Question bank: loads at startup
- Question bank → 25-question sampler: source questions
- 25-question sampler → Quiz state: defines session scope
- Tkinter GUI → Navigation actions: user actions
- Navigation actions → Quiz state: save, restore, clear
- Quiz state → Tkinter GUI: current question and progress
- Quiz state → Scoring engine: recorded answers
- 25-question sampler → Scoring engine: sampled questions
- Scoring engine → Results and review: score and review data
- Results and review → PDF report export: export request
- Dependencies → ReportLab: declares
- ReportLab → PDF report export: generates report