Loading the lesson
Loading the lesson
AI & ML Engineering · Programming Foundations · Lesson 2 of 10
What AI assistants now write for you, and the skills that stay yours.
Read the short notes and pictures.Do everything inside a blue frame.
Describe what you want in a sentence and an AI assistant will write working code for it. That changes what a beginner has to learn first.
You ask
Read sales.csv and print the total for each city, largest first.
The assistant writes
import pandas as pd
df = pd.read_csv("sales.csv")
totals = df.groupby("city")["amount"].sum()
print(totals.sort_values(ascending=False))The assistant types. You stay responsible for the result. These four skills are what this unit builds.
Read code
Follow what each line does, so you know what you are running.
Break problems down
Turn a vague goal into small steps you can ask for one at a time.
Check the result
Run it on a case where you already know the answer.
Debug
Read the error, find the line, and work out what was assumed wrongly.
Exact syntax
Where the colon goes, how a loop is spelled.
Library details
Which function does the job and what its options are called.
Boilerplate
The setup code that is the same in every project.
The assistant gives you code. It runs without errors, but the total it prints is wrong. Who has to catch that?
Deep enough to read code and direct it. The lessons that follow give you that for Python, SQL, Git and APIs. You do not need to memorise them. The depth comes later, from the projects, where you will meet each idea again when you need it.
When code arrives from an assistant, read it before you run it. Four questions get you most of the way.
What does it read?
Files, user input, an API, a database. Know where its data comes from.
What does it change?
Does it write a file, delete rows, send an email? Anything that changes the world needs a closer look.
Where could it fail?
An empty file, a missing key, a network error. Find the line that would break.
Does it give the right answer?
Run it on a small case where you already know the answer.
An assistant wrote this to average a list of scores. Run it in your head on [80, 90]. What does it return, and what is wrong? def average(scores): total = 0 for s in scores: total = total + s return total / 3
Hint: Count how many scores there are, then look at what the total is divided by.
Which of these is most worth your time to learn deeply right now?
thenthenandKeep these