Python for AI & Data
From print() to your first chatbot.
Python for AI & Data assumes you've finished Python Foundations (or equivalent) and teaches the tools that AI/data work actually uses — pandas DataFrames, simple plots, calling the Lovable AI Gateway, and writing prompts that produce structured output.
Why it matters
- AI is the highest-leverage skill in the 2026 job market.
- Students who can call an LLM API have a 2–3x edge in early career.
- Direct on-ramp into Drishti Innovations's flagship AI Mastery track.
Who it's for
- Class 9–12 students who completed Python Foundations
- Future engineers / data analysts / AI builders
- Olympiad students wanting a parallel future-skill
Modules
- Module 1Python recap
Refresh print, variables, and lists before data and AI tools.
- Module 2Lists & dicts deep dive
Filter rows, look up labels, and prepare tidy data for charts.
- Module 3Functions for AI
Wrap prompts and formatters in reusable functions before calling an API.
- Module 4Reading CSVs
Open comma-separated mark sheets in Python — the format behind most school data exports.
- Module 5Pandas basics
Think in tables — rows of records before you import the real pandas library on a laptop.
- Module 6Filtering data
Keep only rows that match a rule — passing marks, one subject, one class.
- Module 7Simple plots
Turn numbers into pictures — bar charts help principals spot trends fast.
- Module 8Calling the AI gateway
Apps call an HTTPS endpoint with a prompt — never paste API keys in the browser.
- Module 9Prompt design in code
Build prompts with f-strings and templates — variables make one function work for many classes.
- Module 10Structured outputs
Ask AI to return JSON you can parse — keys like summary, risks, next_steps.
- Module 11Building a chatbot loop
while True + input() = REPL chat — exit on quit, keep history in a list.
- Module 12Capstone prep
Ship Class Data Assistant — CSV in, filtered table + AI summary + chart out.
Mini Chatbot or Data Dashboard
Pick one: (a) a chatbot tuned for your school (mascot, rules, FAQs), or (b) a 2-chart data dashboard from a CSV of your choice (e.g., class marks).
- Works end-to-end (2 pts)
- Code is split into 2+ functions (2 pts)
- Handles a bad input / empty result (2 pts)
- Reflection: one limitation of your bot/dashboard (2 pts)
- Bonus: shared with classmates (2 pts)
Outcomes
- Load a CSV with pandas and answer 5 questions about it
- Make a bar chart and a line chart
- Call the Lovable AI gateway from Python (via a server function)
- Build a mini chatbot for your school
FAQ
Do I need to know AI math?
No. We focus on building with AI, not training models from scratch.
Is the AI gateway free for me?
Yes — Drishti Innovations provides the AI gateway with usage caps so students can experiment safely.
