# Python 101: Basics to Pro

A lightweight Python desktop app that teaches Python through short lessons, daily practice, quizzes, and projects that grow from a first mini-project to a capstone.

For the full feature inventory, development history, architecture, build instructions, and current limitations, see [PROJECT_DOCUMENTATION.md](./PROJECT_DOCUMENTATION.md).

## Requirements

- Python 3.10 or later
- Tkinter (included with most Python installations)

No third-party packages are required. The app does not need a GPU.

On first launch, a short welcome guide explains the learning path and PythonSandbox.com integration. Reopen it any time with **Start Here** in the navigation. Finishing the guide is remembered with the learner's progress.

## Run

From this folder, run:

```powershell
python main.py
```

## Landing page

Open `index.html` in a browser to preview the product landing page. Its Windows download button links to the bundle created by the packaging script at `dist\Python101-windows.zip`. The membership section describes a plan under consideration; subscriptions and waitlist sign-up are not implemented yet.

To preview over a local web server:

```powershell
python -m http.server 8000
```

Then visit `http://localhost:8000`.

## How it works

- **Home:** Get a daily practice task and a shortcut to your next unfinished lesson.
- **Lessons:** Follow 15 lessons across five stages. Each lesson includes a short explanation, runnable example, hands-on task, and two-question quiz. Mark the task done to complete the lesson; the app asks whether you want to continue to the next one.
- **Progressive hints:** Reveal lesson and challenge hints one at a time; the hint count is saved so you can pick up later.
- **Challenges:** Try four bite-sized coding challenges in PythonSandbox.com. Starter code can be copied to your clipboard, and completion is self-reported because the app cannot inspect code entered on the external site. Reveal progressive hints and earn XP when you mark a challenge practiced.
- **Games:** Play three short, themed choice games for Python practice: a jungle loop expedition, a space-station debugging mission, and a robot rescue story.
- **Personalized practice:** The home page recommends a lesson with a low latest quiz score before suggesting new material. Your best quiz score is retained separately from your latest attempt.
- **Badges and gentle streaks:** Collect badges for learning milestones. Streaks count learning days without resets or penalties; taking a break never removes earned badges or progress.
- **PythonSandbox.com:** Lessons, challenges, games, and projects link to the external site. Example and starter code is copied to your clipboard only after you choose a copy-and-open action; paste it on the site yourself. The site does not embed in the app, and the app does not verify its execution or security.
- **Projects:** Work through five progressively larger projects. A project's stage lessons must be completed before it unlocks.
- **My Packs:** Install the free Files & Folders sample pack for two lessons, three coding challenges, and a guided Notes Organizer project. Its content and progress are stored separately from the core learning path; uninstalling the pack removes both.
- **Shop demo:** Preview proposed Pro and content-pack listings. A simulated checkout opens a local-only page in the default browser and returns to the app; it does not connect to PayPal or charge money.
- **Profile and billing demo:** Optionally save a full name, email, birthday, contact and billing addresses, and a PNG/GIF profile picture. These details and demo purchase markers stay in local app data; they are not an online account or verified billing history.
- **Progress:** Core lesson, quiz, project, and daily-task progress is saved in `%APPDATA%\Python 101 - Basics to Pro\progress.json` on Windows. Installed pack content and its progress are stored under `%APPDATA%\Python 101 - Basics to Pro\Packs`.
- **Desktop UI:** Resize the window and scroll through long pages; lesson text adjusts to the available space.

PythonSandbox.com is a third-party website. Opening it does not send code automatically, but code pasted or typed there is subject to that site's handling and privacy practices. Review the site's current terms and security practices before using it; do not enter private or sensitive code.

## Build a Windows app

The Windows packaging script makes a self-contained, windowed app bundle, a ZIP archive, and a per-user setup installer. Python is not needed to run the bundled app.

```powershell
python -m pip install -r requirements-build.txt
.\build-windows.ps1
```

The app folder is created at `dist\Python101`, the archive at `dist\Python101-windows.zip`, and the installer at `dist\installer\Python101-Setup.exe`. Install Inno Setup 6 to build the installer. It installs for the current Windows user, adds a Start Menu shortcut, and offers an optional desktop shortcut. The progress file stays in the user's `%APPDATA%` folder, outside the installed app directory.

The installer is not code-signed. Test it on a clean Windows machine before distribution.

**Real accounts and purchases are not implemented.** Profile details, including contact and billing addresses, email, birthday, and the selected picture, are optional and stored unencrypted on this device only. They are not uploaded or connected to a billing provider. The Shop's browser checkout is a local simulation; it doesn't connect to PayPal or another payment provider, verify purchases, provide real Pro/pack access controls, or download content. Demo purchase markers are editable local progress data and are not proof of purchase. The installer still includes the full app. Do not use it to deliver paid access until a secure backend, account system, payment verification, product entitlements, and pack delivery are implemented and tested.

The Files & Folders pack is currently bundled as a free sample and can be installed from **My Packs** without purchasing anything. This local install flow is a prototype, not the paid-pack delivery system.

Tests can be run with:

```powershell
python -m unittest
```
