AI can write a working Python script before you finish typing the question. That is the odd part of trying to learn to code with AI. The tool that makes coding feel easy also makes it easy to skip the part where you actually learn.
How you use it seems to matter more than whether you use it. In a randomized study of 52 mostly junior engineers learning a new Python library, the AI-assisted group averaged 50% on a follow-up quiz against 67% for the group that coded without AI, and the biggest gap appeared on debugging questions. The participants who showed stronger mastery used AI to build understanding as well as to produce code, by asking follow-up questions, requesting explanations and posing conceptual questions.
This roadmap is built around that finding. You will learn Python over three 30-day phases, and AI plays a different role in each: tutor, then reviewer, then pair programmer. By day 90 you will have written, tested and published small programs yourself. That is a solid foundation, not a job-ready portfolio, and the final section explains the difference.
What You Still Need to Learn When AI Writes the Code
Typing syntax from memory is the skill AI replaced fastest. Four skills are still yours:
- Reading code. You cannot judge what you cannot read.
- Breaking problems into steps. AI needs a clear description of what you want.
- Debugging. Code that is almost right fails in confusing ways.
- Verifying. Running code and testing edge cases is the only proof it works.
Learners already mix their resources. In Stack Overflow’s 2025 survey, developers who learned to code in the past year leaned on technical documentation most (68%), with AI tools at 44%, and 75% of respondents said they would still ask another person when they did not trust an AI answer. AI is one tool among docs, people and practice.
| Task | Hand it to AI? | Why |
|---|---|---|
| Explaining an error message | Yes, after you have read it yourself | You learn to read tracebacks first |
| Boilerplate you already understand | Yes | It saves typing, not learning |
| Your first loops and functions | No (days 1–30) | Struggling here builds the skill |
| Choosing a project’s structure | Discuss it, then decide yourself | You own the design |
| Deciding if code is correct | Never | Only running and testing can confirm it |
Set Your AI Rules Before Day 1
Think of AI as a dial with three settings. You turn it up as your skills grow.

| Phase | Days | AI’s role | What you do |
|---|---|---|---|
| 1 | 1–30 | Tutor | Write every line yourself. Ask for explanations and hints, never full solutions. |
| 2 | 31–60 | Reviewer | Write and run your code first. Then ask what could break and what is unclear. |
| 3 | 61–90 | Pair programmer | Let AI scaffold and suggest. Read every line and write tests before you keep anything. |
Three habits make the dial work.
Try first for 20 minutes. The 20 minutes is my rule of thumb, not a research result. The reasoning behind it is that researchers argue that getting stuck and working through errors is essential for building durable skills.
Ask for explanations, not answers. These prompts keep you in the driver’s seat:
I'm a beginner. Don't write the solution. Give me one hint about what to check next.
Explain this error in plain English, then ask me what I think the fix is.
Here is my working code. What edge cases would break it? Don't rewrite it.Some assistants now include this style as a built-in mode. ChatGPT’s Study Mode asks guiding questions instead of handing over answers, though students can switch back to regular mode at any time, and Anthropic launched a similar Learning Mode for Claude earlier that year. If you use Claude, our guide to using Claude for coding covers the setup.
Predict before you run. Before executing any code, say what you expect it to print. A wrong prediction shows you exactly what you misunderstood.
Before Day 1: A 20-Minute Setup
- Install Python from python.org. Python 3.15.0 was released on October 9, 2026, but any version from 3.12 up works for everything below. Python 3.10 has reached end-of-life, so avoid it.
- Install a code editor such as Visual Studio Code.
- Open a terminal and create a project folder:
python --version
mkdir coding-90
cd coding-90On Windows, if python is not recognized, use py --version instead. Save every file in this tutorial inside coding-90.
The 90-Day Roadmap at a Glance
The plan assumes about an hour a day, five or six days a week, which comes to roughly 65–75 hours in total.
| Phase | Days | Focus | Finish line |
|---|---|---|---|
| 1 | 1–30 | Variables, conditions, loops, functions, lists, dictionaries | Three small terminal programs |
| 2 | 31–60 | Files, JSON, errors, modules, Git, basic tests | A working expense tracker |
| 3 | 61–90 | One self-chosen project, tests, README | A public GitHub repository |

Days 1–30: Learn the Basics by Hand
Use AI only as a tutor in this phase. A rough weekly outline:
- Week 1: variables, numbers, strings,
input()andprint(). - Week 2:
if/elif/else, comparisons,whileandforloops. - Week 3: functions, lists and dictionaries.
- Week 4: reading errors, simple files, and finishing three programs (a number-guessing game, a unit converter and a terminal to-do list).
Your first program, hello.py, takes two lines:
name = input("What's your name? ")
print(f"Hello, {name}! Day one is done.")Run it with python hello.py. Type a name and it greets you.
Predict, Run, Break, Fix
From week 3 on, use this exercise on every small function you write. Save this as average.py:
def average(numbers):
total = 0
for n in numbers:
total += n
return total / len(numbers)
print(average([4, 8, 15]))Predict the output first. It prints 9.0, because 27 divided by 3 is 9. Now change the last line to print(average([])) and run it again. Python stops with ZeroDivisionError: division by zero.
Read the bottom line of the traceback first, then the line number above it. An empty list has a length of 0, and dividing by zero is impossible. That is the bug, and you found it without AI. Here is a fix with two checks that confirm it:
def average(numbers):
if not numbers:
return 0
return sum(numbers) / len(numbers)
assert average([2, 4, 6]) == 4
assert average([]) == 0
print("All checks passed")If either assert fails, Python raises an AssertionError. If both pass, you see the message. This is your first test.

If you want a structured course alongside this plan, CS50P is Harvard’s introduction to programming with Python, and it teaches reading, writing, testing and debugging code. It can be taken for free through Harvard’s OpenCourseWare. Save Python’s official tutorial for Phase 2, because it is designed for programmers who are new to Python, not for people new to programming.
Days 31–60: Build Programs That Remember Things
AI becomes a reviewer in this phase. Write the code, run it, and only then ask for feedback. The skills to add are reading and writing files, JSON, try/except, importing modules, basic Git, and more assert checks.
Your project is an expense tracker that stores data between runs. Save it as expenses.py:
import json
from pathlib import Path
DATA_FILE = Path("expenses.json")
def load_expenses():
if DATA_FILE.exists():
return json.loads(DATA_FILE.read_text(encoding="utf-8"))
return []
def save_expenses(expenses):
DATA_FILE.write_text(json.dumps(expenses, indent=2), encoding="utf-8")
def add_expense(expenses, category, amount):
if amount <= 0:
raise ValueError("Amount must be greater than zero.")
expenses.append({"category": category, "amount": amount})
def total_by_category(expenses):
totals = {}
for item in expenses:
totals[item["category"]] = totals.get(item["category"], 0) + item["amount"]
return totals
def main():
expenses = load_expenses()
category = input("Category: ").strip().lower()
try:
amount = float(input("Amount: "))
add_expense(expenses, category, amount)
except ValueError as error:
print(f"Could not add expense: {error}")
return
save_expenses(expenses)
for name, total in total_by_category(expenses).items():
print(f"{name}: {total:.2f}")
if __name__ == "__main__":
main()Run it with python expenses.py. Enter Food and 12.5 and it prints food: 12.50. Run it again with food and 7.5 and it prints food: 20.00, because the data was saved to expenses.json. Enter abc as the amount and the try/except block catches the error instead of crashing.
Three details are worth understanding before you move on:
Pathandread_text()handle file reading without manual open/close code.- Splitting the logic into small functions makes each one testable, as you saw with
average(). if __name__ == "__main__":runsmain()only when you execute the file directly, not when another file imports it.
Now ask your AI reviewer a question like this one: “Here is my working expense tracker. What happens if expenses.json is corrupted? Don’t rewrite it, just explain the risk.” Then fix it yourself. Add a delete command and write assert checks for total_by_category().
Put your work under version control with Git:
git init
git add expenses.py
git commit -m "Add expense tracker"Days 61–90: Ship One Real Project
AI can now act as a pair programmer, but you stay in charge. Pick one project that matches your goal:
| Goal | Project idea | What it forces you to learn |
|---|---|---|
| Automation | A script that sorts files in a folder by type | File handling, loops, error handling |
| Web | A small web app showing your expense data, using a framework such as Flask | Routing, templates, project structure |
| Data | An analysis and chart of a public dataset | Reading CSVs, cleaning data, plotting |
Follow these rules for the whole phase:
- Write a spec first. One paragraph covering what the program does, its inputs, its outputs, and the edge cases.
- Let AI scaffold, then read everything. If you cannot explain a function, rewrite it or ask AI to explain it before you keep it.
- Write at least five tests for the functions that matter most.
- Keep a bug log. Note the error, your guess, and the actual cause. Patterns will show up quickly.
- Finish with a README and a public GitHub repository.
This phase is also the right moment to experiment with AI-built apps. Our beginner’s guide to vibe coding explains the approach and its trade-offs, and it works far better once you can review what the AI produces.
A 60-Minute Daily Routine
| Minutes | Activity |
|---|---|
| 5 | Re-read yesterday’s notes and rerun yesterday’s code |
| 35 | Build or practise by hand, using the AI rules for your current phase |
| 15 | Debug and fix; this is the part that builds the most skill |
| 5 | Write one sentence on what you learned |
Mistakes That Stall AI-Era Learners
- Pasting the error before reading it. Read the last line of the traceback first, every time.
- Collecting tutorials instead of building. One finished small project beats five half-watched courses.
- Accepting code that looks right. In the 2025 Stack Overflow survey, 66% of developers said they spend more time fixing AI-generated code that is almost right.
- Sharing secrets. Never paste API keys, passwords or client data into a prompt. Replace them with placeholders.
- Skipping tests. An
asserttakes ten seconds and catches mistakes that a quick glance misses.
What to Expect on Day 91
After 90 days on this plan, you should be able to read and write small Python programs, track down common errors, use Git, and judge whether AI-generated code is trustworthy. You will also have three finished projects.
You will not be job-ready, and no 90-day plan changes that. The research behind this roadmap is also limited, since the Anthropic study measured comprehension shortly after a single learning session. It shows how AI use shapes learning, not what happens over months.
Your next step depends on your goal. For web work, add HTML, CSS and JavaScript. For data work, go deeper on analysis libraries. For automation, build more scripts around problems you actually have.
Conclusion
AI did not make learning to code obsolete. It changed what is worth practising: reading, debugging and verifying matter more now that typing is cheap. The best way to use AI while learning is to start with it as a tutor, move it to reviewer, and trust it as a pair programmer only once you can check its work. Start today with the two-line hello.py, and let the rest of the 90 days build from there.




