Python for AI and Data
Aabha AI Academy · Foundation course
Outcome: write understandable Python, inspect and clean a small table without hiding data loss, and communicate a reproducible summary with an honest chart.
Audience: people starting programming, and builders who need a reliable Python foundation. No previous coding is assumed. You should be comfortable opening a browser, saving a text file and doing everyday arithmetic. A laptop or desktop keyboard is strongly recommended for substantial editing; the browser route needs internet for initial runtime/package loading.
Planning estimate: about 24–32 hours including practice, troubleshooting and the capstone, not a guaranteed completion time. Take breaks and repeat exercises rather than rushing. Modules 0–9 each have a worked script, three focused practice tasks, an exit check and separately located solutions. Module 10 combines the skills into one assessed project. There are no exams or credentials automatically awarded by these files.
Sequence and evidence of learning
| Order | Module | Practice target | Suggested effort | Lab profile |
|---|---|---|---|---|
| 0 | Run, change, explain | Run code, distinguish source/output and keep a copy | 30–45 min | Python basics |
| 1 | Values, names and types | Convert text deliberately and calculate with units | 90–120 min | Python basics |
| 2 | Decisions and repetition | Trace branches and loops, including boundaries | 2 h | Python basics |
| 3 | Collections and records | Select lists/dicts/sets/tuples; avoid shared-edit mistakes | 2 h | Python basics |
| 4 | Functions and modules | Write a clear input/output contract and reuse a function | 2 h | Python basics |
| 5 | Files, CSV and errors | Read rows, preserve bad input and handle expected failures | 2–3 h | Python basics |
| 6 | Debugging and tests | Reproduce a bug and guard a fix with edge-case tests | 2 h | Python basics |
| 7 | NumPy arrays | Explain shape, axes, elementwise operations and copies | 2 h | Data |
| 8 | pandas tables | Inspect, normalize, validate, filter and group small data | 2–3 h | Data |
| 9 | Charts that answer a question | Choose a chart, label units and state limitations | 2 h | Charts |
| 10 | Capstone: workshop-order audit | Deliver source, quality report, clean outputs and a chart | 5–7 h including bridge labs | Data / Charts or local |
Using the exercise starters
Lines beginning with assert are supplied checks. Keep the supplied input and its expectation together as your first case: a false expectation raises AssertionError and stops that run. Blanks use None or NotImplementedError deliberately, so an unfinished starter is expected to fail. Write your answer above the checks, rerun the whole file and read the first failure. Module 6 explains tests in detail. For a new input, decide the expected result from the written contract BEFORE running, then add a separate matched case. For example, 30 minutes expects long, while 0 expects rest; an unchanged long assertion attached to input 0 tests the wrong rule. Never change an expectation merely to fit broken output. A passing check is followed by an explanation and a genuinely changed input.
Completion standard
Do not complete a module solely because its example ran. Before moving on, explain the exit check in your own words, solve the exercises without copying the reference, and deliberately test a changed input. If you consult a solution, close it and recreate the approach from memory with another input.
For the capstone, run the supplied public checks against YOUR function using python check_capstone.py, or the checks embedded in the browser starter. Then submit the script, original CSV, accepted/rejected/duplicate exports, category summary, labelled chart, test results and a short interpretation. Passing reference tests is not a learner grade. Score with the rubric in lessons/10_capstone.md: at least 16/20 and no critical failure. Critical failures are editing raw evidence to pass checks, silently discarding invalid records, a non-reproducible result, or describing the accepted subtotal as a complete sales total. This is a proposed instructional assessment, not a claim that a learner pilot has passed it.
Optional readiness route
Experienced learners may attempt exercises/readiness.py before Module 1. Implement all four functions and pass python check_readiness.py. Also explain aliasing, an empty-input policy, and why an invalid CSV row must remain visible. This is a lightweight placement screen, not proof of every skill in Modules 1–6. Before skipping ahead, also complete the Module 5 CSV export/round-trip task and the Module 6 diagnostic worksheet, and review the optional local-import example if you will work locally. Then begin at Module 7; the screen is not evidence of NumPy/pandas proficiency. If any task is unfamiliar, use Modules 1–6.
Boundaries
This course prepares learners for later AI engineering courses. It does not teach model fitting, train/test splits, deep learning, generative-AI APIs, deployment, web scraping or production data engineering. AI tools are optional: predict outputs and attempt the work yourself first; do not paste private datasets or credentials into a lab or assistant.
Course design and source fit
The public course page reviewed on 14 October 2026 identifies a planned beginner Python foundation followed by an applied data project, with enrolment not open. This package expands that scope into teachable material; it does not change enrolment or public completion status. Browser profile details and the exact test coverage are recorded in VERIFICATION.md. Links to current primary documentation are in SOURCES.md.